Documentation
¶
Index ¶
Constants ¶
View Source
const ( DOWN float64 = 0 UP float64 = 1 )
heartbeats_heartbeat_last_status
View Source
const ( SUCCESS float64 = 0 ERROR float64 = 1 )
heartbeats_receiver_last_status
Variables ¶
View Source
var ( // LastStatus reports the most recent status of each heartbeat (0 = DOWN, 1 = UP). LastStatus = prometheus.NewGaugeVec( prometheus.GaugeOpts{ Name: "heartbeats_heartbeat_last_status", Help: "Most recent status of each heartbeat (0 = DOWN, 1 = UP)", }, []string{"heartbeat"}, ) // ReceivedTotal counts the total number of received heartbeats per ID. ReceivedTotal = prometheus.NewCounterVec( prometheus.CounterOpts{ Name: "heartbeats_heartbeat_received_total", Help: "Total number of received heartbeats per ID", }, []string{"heartbeat"}, ) // ReceiverErrorStatus reports the status of the last notification attempt (1 = ERROR, 0 = SUCCESS) ReceiverErrorStatus = prometheus.NewGaugeVec( prometheus.GaugeOpts{ Name: "heartbeats_receiver_last_status", Help: "Reports the status of the last notification attempt (1 = ERROR, 0 = SUCCESS)", }, []string{"receiver", "type", "target"}, ) )
Functions ¶
This section is empty.
Types ¶
type Metrics ¶
type Metrics struct {
Registry *prometheus.Registry
}
Metrics wraps a Prometheus registry and provides functionality for metric registration.
func NewMetrics ¶
NewMetrics creates and initializes a new Metrics instance with all relevant metrics registered.
Click to show internal directories.
Click to hide internal directories.