Documentation ¶
Index ¶
- Constants
- Variables
- func DeleteMachineHealthCheckNodesCovered(name string, namespace string)
- func InitializeMachineHealthCheckMetrics()
- func ObserveMachineHealthCheckNodesCovered(name string, namespace string, count int)
- func ObserveMachineHealthCheckRemediationSuccess(name string, namespace string)
- func ObserveMachineHealthCheckShortCircuitDisabled(name string, namespace string)
- func ObserveMachineHealthCheckShortCircuitEnabled(name string, namespace string)
- func RegisterFailedInstanceCreate(labels *MachineLabels)
- func RegisterFailedInstanceDelete(labels *MachineLabels)
- func RegisterFailedInstanceUpdate(labels *MachineLabels)
- type MachineCollector
- type MachineLabels
Constants ¶
View Source
const ( DefaultMachineSetMetricsAddress = ":8082" DefaultMachineMetricsAddress = ":8081" DefaultMetal3MetricsAddress = ":60000" )
View Source
const (
DefaultHealthCheckMetricsAddress = ":8083"
)
Variables ¶
View Source
var ( // MachineHealthCheckNodesCovered is a Prometheus metric, which reports the number of nodes covered by MachineHealthChecks MachineHealthCheckNodesCovered = prometheus.NewGaugeVec( prometheus.GaugeOpts{ Name: "mapi_machinehealthcheck_nodes_covered", Help: "Number of nodes covered by MachineHealthChecks", }, []string{"name", "namespace"}, ) // MachineHealthCheckRemediationSuccessTotal is a Prometheus metric, which reports the number of successful remediations by MachineHealthChecks MachineHealthCheckRemediationSuccessTotal = prometheus.NewCounterVec( prometheus.CounterOpts{ Name: "mapi_machinehealthcheck_remediation_success_total", Help: "Number of successful remediations performed by MachineHealthChecks", }, []string{"name", "namespace"}, ) // MachineHealthCheckShortCircuit is a Prometheus metric, which reports when the named MachineHealthCheck is currently short-circuited (0=no, 1=yes) MachineHealthCheckShortCircuit = prometheus.NewGaugeVec( prometheus.GaugeOpts{ Name: "mapi_machinehealthcheck_short_circuit", Help: "Short circuit status for MachineHealthCheck (0=no, 1=yes)", }, []string{"name", "namespace"}, ) )
View Source
var ( // MachineCountDesc is a metric about machine object count in the cluster MachineCountDesc = prometheus.NewDesc("mapi_machine_items", "Count of machine objects currently at the apiserver", nil, nil) // MachineSetCountDesc Count of machineset object count at the apiserver MachineSetCountDesc = prometheus.NewDesc("mapi_machineset_items", "Count of machinesets at the apiserver", nil, nil) // MachineInfoDesc is a metric about machine object info in the cluster MachineInfoDesc = prometheus.NewDesc("mapi_machine_created_timestamp_seconds", "Timestamp of the mapi managed Machine creation time", []string{"name", "namespace", "spec_provider_id", "node", "api_version", "phase"}, nil) // MachineSetInfoDesc is a metric about machine object info in the cluster MachineSetInfoDesc = prometheus.NewDesc("mapi_machineset_created_timestamp_seconds", "Timestamp of the mapi managed Machineset creation time", []string{"name", "namespace", "api_version"}, nil) // MachineSetStatusAvailableReplicasDesc is the information of the Machineset's status for available replicas. MachineSetStatusAvailableReplicasDesc = prometheus.NewDesc("mapi_machine_set_status_replicas_available", "Information of the mapi managed Machineset's status for available replicas", []string{"name", "namespace"}, nil) // MachineSetStatusReadyReplicasDesc is the information of the Machineset's status for ready replicas. MachineSetStatusReadyReplicasDesc = prometheus.NewDesc("mapi_machine_set_status_replicas_ready", "Information of the mapi managed Machineset's status for ready replicas", []string{"name", "namespace"}, nil) // MachineSetStatusReplicasDesc is the information of the Machineset's status for replicas. MachineSetStatusReplicasDesc = prometheus.NewDesc("mapi_machine_set_status_replicas", "Information of the mapi managed Machineset's status for replicas", []string{"name", "namespace"}, nil) // MachineCollectorUp is a Prometheus metric, which reports reflects successful collection and reporting of all the metrics MachineCollectorUp = prometheus.NewGaugeVec(prometheus.GaugeOpts{ Name: "mapi_mao_collector_up", Help: "Machine API Operator metrics are being collected and reported successfully", }, []string{"kind"}) )
View Source
var ( // MachinePhaseTransitionSeconds is a metric to capute the time between a Machine being created and entering a particular phase MachinePhaseTransitionSeconds = prometheus.NewHistogramVec( prometheus.HistogramOpts{ Name: "mapi_machine_phase_transition_seconds", Help: "Number of seconds between Machine creation and Machine transition to a phase.", Buckets: []float64{5, 10, 20, 30, 60, 90, 120, 180, 240, 300, 360, 480, 600}, }, []string{"phase"}, ) )
Metrics for use in the Machine controller
Functions ¶
func InitializeMachineHealthCheckMetrics ¶
func InitializeMachineHealthCheckMetrics()
func RegisterFailedInstanceCreate ¶
func RegisterFailedInstanceCreate(labels *MachineLabels)
func RegisterFailedInstanceDelete ¶
func RegisterFailedInstanceDelete(labels *MachineLabels)
func RegisterFailedInstanceUpdate ¶
func RegisterFailedInstanceUpdate(labels *MachineLabels)
Types ¶
type MachineCollector ¶
type MachineCollector struct {
// contains filtered or unexported fields
}
MachineCollector is implementing prometheus.Collector interface.
func NewMachineCollector ¶
func NewMachineCollector(machineInformer machineinformers.MachineInformer, machinesetInformer machineinformers.MachineSetInformer, namespace string) *MachineCollector
func (*MachineCollector) Collect ¶
func (mc *MachineCollector) Collect(ch chan<- prometheus.Metric)
Collect is method required to implement the prometheus.Collector(prometheus/client_golang/prometheus/collector.go) interface.
func (MachineCollector) Describe ¶
func (mc MachineCollector) Describe(ch chan<- *prometheus.Desc)
Describe implements the prometheus.Collector interface.
type MachineLabels ¶
MachineLabels is the group of labels that are applied to the machine metrics
Click to show internal directories.
Click to hide internal directories.