Harden production workflows and agent admission
This commit is contained in:
@@ -28,6 +28,7 @@ type Metrics struct {
|
||||
SendFailures *prometheus.CounterVec
|
||||
EventsAccepted prometheus.Counter
|
||||
EventsDedup prometheus.Counter
|
||||
EventsDropped *prometheus.CounterVec
|
||||
LastHeartbeat prometheus.Gauge
|
||||
BuildInfo *prometheus.GaugeVec
|
||||
}
|
||||
@@ -86,6 +87,10 @@ func New() *Metrics {
|
||||
Name: "monlet_agent_events_deduplicated_total",
|
||||
Help: "Events the server reported as duplicates.",
|
||||
})
|
||||
m.EventsDropped = prometheus.NewCounterVec(prometheus.CounterOpts{
|
||||
Name: "monlet_agent_events_dropped_total",
|
||||
Help: "Events dropped by the agent before server acceptance, by reason (low-cardinality enum).",
|
||||
}, []string{"reason"})
|
||||
m.CheckStatus = prometheus.NewGaugeVec(prometheus.GaugeOpts{
|
||||
Name: "monlet_agent_check_status",
|
||||
Help: "Last observed status per check: 0=ok,1=warning,2=critical,3=unknown.",
|
||||
@@ -123,7 +128,7 @@ func New() *Metrics {
|
||||
m.CheckInterval, m.ChecksConfigured,
|
||||
m.SpoolDepth, m.SpoolBytes,
|
||||
m.SendAttempts, m.SendFailures,
|
||||
m.EventsAccepted, m.EventsDedup,
|
||||
m.EventsAccepted, m.EventsDedup, m.EventsDropped,
|
||||
m.LastHeartbeat, m.BuildInfo)
|
||||
return m
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user