Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // MachineControllerFrozenDesc is a metric about MachineController's frozen status MachineControllerFrozenDesc = prometheus.NewDesc("mcm_machine_controller_frozen", "Frozen status of the machine controller manager.", nil, nil) // MachineCountDesc is a metric about machine count of the mcm manages MachineCountDesc = prometheus.NewDesc("mcm_machine_items_total", "Count of machines currently managed by the mcm.", nil, nil) // MachineCSPhase Current status phase of the Machines currently managed by the mcm. MachineCSPhase = prometheus.NewDesc( prometheus.BuildFQName(namespace, machineSubsystem, "current_status_phase"), "Current status phase of the Machines currently managed by the mcm.", []string{"name", "namespace"}, nil) // MachineInfo Information of the Machines currently managed by the mcm. MachineInfo = prometheus.NewGaugeVec(prometheus.GaugeOpts{ Namespace: namespace, Subsystem: machineSubsystem, Name: "info", Help: "Information of the Machines currently managed by the mcm.", }, []string{"name", "namespace", "createdAt", "spec_provider_id", "spec_class_api_group", "spec_class_kind", "spec_class_name", "node_name"}) // MachineStatusCondition Information of the mcm managed Machines' status conditions MachineStatusCondition = prometheus.NewGaugeVec(prometheus.GaugeOpts{ Namespace: namespace, Subsystem: machineSubsystem, Name: "status_condition", Help: "Information of the mcm managed Machines' status conditions.", }, []string{"name", "namespace", "condition"}) // MachineCreateDurationSeconds is the Prometheus gauge metric representing the time duration // in seconds to create a Machine of a MachineDeployment from the time of Machine creation. MachineCreateDurationSeconds = prometheus.NewGaugeVec(prometheus.GaugeOpts{ Namespace: namespace, Subsystem: machineSubsystem, Name: "create_duration_seconds", Help: "Duration in seconds to create a Machine of a MachineDeployment.", }, []string{"namespace", "machine_deployment", "instance_type", "zone"}) // MachineInitializeDurationSeconds is the Prometheus gauge metric representing the time duration // in seconds to initialize a Machine of a MachineDeployment. MachineInitializeDurationSeconds = prometheus.NewGaugeVec(prometheus.GaugeOpts{ Namespace: namespace, Subsystem: machineSubsystem, Name: "initialize_duration_seconds", Help: "Duration in seconds to initialize a Machine of a MachineDeployment.", }, []string{"namespace", "machine_deployment", "instance_type", "zone"}) // MachineJoinDurationSeconds is the Prometheus gauge metric representing the time duration // in seconds for a Machine of a MachineDeployment to join the cluster from the time of Machine creation. MachineJoinDurationSeconds = prometheus.NewGaugeVec(prometheus.GaugeOpts{ Namespace: namespace, Subsystem: machineSubsystem, Name: "join_duration_seconds", Help: "Duration in seconds for a Machine of a MachineDeployment to join the cluster", }, []string{"namespace", "machine_deployment", "instance_type", "zone"}) // MachineDrainDurationSeconds is the Prometheus gauge metric representing the time duration // in seconds to drain a Machine of a MachineDeployment. MachineDrainDurationSeconds = prometheus.NewGaugeVec(prometheus.GaugeOpts{ Namespace: namespace, Subsystem: machineSubsystem, Name: "drain_duration_seconds", Help: "Duration in seconds to drain a Machine of a MachineDeployment.", }, []string{"namespace", "machine_deployment"}) // MachineDeleteDurationSeconds is the Prometheus gauge metric representing the time duration // in seconds to delete a Machine for a MachineDeployment. MachineDeleteDurationSeconds = prometheus.NewGaugeVec(prometheus.GaugeOpts{ Namespace: namespace, Subsystem: machineSubsystem, Name: "delete_duration_seconds", Help: "Duration in seconds to delete a Machine of a MachineDeployment.", }, []string{"namespace", "machine_deployment", "instance_type", "zone"}) // MachineNumFailedJoin is the Prometheus counter metric representing the number of machines that // failed to join the cluster for a MachineDeployment. MachineNumFailedJoin = prometheus.NewCounterVec(prometheus.CounterOpts{ Namespace: namespace, Subsystem: machineSubsystem, Name: "num_failed_join", Help: "Number of Machines of a MachineDeployment that failed to join the cluster.", }, []string{"namespace", "machine_deployment", "instance_type", "zone"}) )
variables for subsystem: machine
View Source
var ( // APIRequestCount Number of Cloud Service API requests, partitioned by provider, and service. APIRequestCount = prometheus.NewCounterVec(prometheus.CounterOpts{ Namespace: namespace, Subsystem: cloudAPISubsystem, Name: "requests_total", Help: "Number of Cloud Service API requests, partitioned by provider, and service.", }, []string{"provider", "service"}, ) // APIFailedRequestCount Number of Failed Cloud Service API requests, partitioned by provider, and service. APIFailedRequestCount = prometheus.NewCounterVec(prometheus.CounterOpts{ Namespace: namespace, Subsystem: cloudAPISubsystem, Name: "requests_failed_total", Help: "Number of Failed Cloud Service API requests, partitioned by provider, and service.", }, []string{"provider", "service"}, ) // APIRequestDuration records duration of all successful provider API calls. // This metric can be filtered by provider and service. APIRequestDuration = prometheus.NewHistogramVec(prometheus.HistogramOpts{ Namespace: namespace, Subsystem: cloudAPISubsystem, Name: "api_request_duration_seconds", Help: "Time(in seconds) it takes for a provider API request to complete", }, []string{"provider", "service"}) // DriverAPIRequestDuration records duration of all successful driver API calls. // This metric can be filtered by provider and operation. DriverAPIRequestDuration = prometheus.NewHistogramVec(prometheus.HistogramOpts{ Namespace: namespace, Subsystem: cloudAPISubsystem, Name: "driver_request_duration_seconds", Help: "Total time (in seconds) taken for a driver API request to complete", }, []string{"provider", "operation"}) // DriverFailedAPIRequests records number of failed driver API calls. // This metric can be filtered by provider, operation and error code. DriverFailedAPIRequests = prometheus.NewCounterVec(prometheus.CounterOpts{ Namespace: namespace, Subsystem: cloudAPISubsystem, Name: "driver_requests_failed_total", Help: "Number of failed Driver API requests, partitioned by provider, operation and error code", }, []string{"provider", "operation", "error_code"}) )
variables for subsystem: cloud_api
View Source
var ( // ScrapeFailedCounter is a Prometheus metric, which counts errors during metrics collection. ScrapeFailedCounter = prometheus.NewCounterVec(prometheus.CounterOpts{ Namespace: namespace, Subsystem: miscSubsystem, Name: "scrape_failure_total", Help: "Total count of scrape failures.", ConstLabels: map[string]string{"binary": "machine-controller-manager-provider"}, }, []string{"kind"}) )
variables for subsystem: misc
Functions ¶
func IncrementNumFailedToJoin ¶ added in v0.63.0
func IncrementNumFailedToJoin(machine *v1alpha1.Machine, machineClass *v1alpha1.MachineClass)
IncrementNumFailedToJoin increments the prometheus metric for the number of machines that failed to join the cluster, deriving label classifiers from the given Machine and MachineClass
func UpdateMetricsForMachineDurations ¶ added in v0.63.0
func UpdateMetricsForMachineDurations(machine *v1alpha1.Machine, machineClass *v1alpha1.MachineClass, newDurations MachineDurations)
UpdateMetricsForMachineDurations updates the prometheus metrics relevant for machine activity durations such as create/initialize/join/drain/delete using the values specified in the given MachineDurations object.
Types ¶
type MachineDurations ¶ added in v0.63.0
type MachineDurations struct {
// Create is the duration to create a Machine from the time of its creation timestamp.
Create time.Duration
// Initialize is the duration to initialize a Machine after creation.
Initialize time.Duration
// Join is the duration for a Machine to join the cluster ie associated Node becomes Ready
Join time.Duration
// Drain is the duration for the machine-controller to drain the Machine or rather the Node associated with a Machine
Drain time.Duration
// Delete is the duration for the machine-controller to delete the Machine from the time its deletion timestamp was set.
Delete time.Duration
}
MachineDurations encapsulates duration data for a machine and used as input to update prometheus metrics.
Click to show internal directories.
Click to hide internal directories.