mirror of
https://github.com/kubernetes-sigs/prometheus-adapter.git
synced 2026-04-07 02:07:58 +00:00
Update custom-metrics-apiserver and metrics-server
This commit is contained in:
parent
4c673534f2
commit
b480e45a67
915 changed files with 63694 additions and 106514 deletions
17
vendor/k8s.io/component-base/metrics/processstarttime.go
generated
vendored
17
vendor/k8s.io/component-base/metrics/processstarttime.go
generated
vendored
|
|
@ -20,29 +20,24 @@ import (
|
|||
"os"
|
||||
"time"
|
||||
|
||||
"github.com/prometheus/client_golang/prometheus"
|
||||
"github.com/prometheus/procfs"
|
||||
|
||||
"k8s.io/klog"
|
||||
)
|
||||
|
||||
var processStartTime = prometheus.NewGaugeVec(
|
||||
prometheus.GaugeOpts{
|
||||
Name: "process_start_time_seconds",
|
||||
Help: "Start time of the process since unix epoch in seconds.",
|
||||
var processStartTime = NewGaugeVec(
|
||||
&GaugeOpts{
|
||||
Name: "process_start_time_seconds",
|
||||
Help: "Start time of the process since unix epoch in seconds.",
|
||||
StabilityLevel: ALPHA,
|
||||
},
|
||||
[]string{},
|
||||
)
|
||||
|
||||
// Registerer is an interface expected by RegisterProcessStartTime in order to register the metric
|
||||
type Registerer interface {
|
||||
Register(prometheus.Collector) error
|
||||
}
|
||||
|
||||
// RegisterProcessStartTime registers the process_start_time_seconds to
|
||||
// a prometheus registry. This metric needs to be included to ensure counter
|
||||
// data fidelity.
|
||||
func RegisterProcessStartTime(registrationFunc func(prometheus.Collector) error) error {
|
||||
func RegisterProcessStartTime(registrationFunc func(Registerable) error) error {
|
||||
start, err := getProcessStart()
|
||||
if err != nil {
|
||||
klog.Errorf("Could not get process start time, %v", err)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue