mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Alerting: Create metric for rules using simple notifications (#82904)
--------- Co-authored-by: Matthew Jacobson <matthew.jacobson@grafana.com>
This commit is contained in:
@@ -20,6 +20,7 @@ type Scheduler struct {
|
||||
EvalDuration *prometheus.HistogramVec
|
||||
ProcessDuration *prometheus.HistogramVec
|
||||
SendDuration *prometheus.HistogramVec
|
||||
SimpleNotificationRules *prometheus.GaugeVec
|
||||
GroupRules *prometheus.GaugeVec
|
||||
Groups *prometheus.GaugeVec
|
||||
SchedulePeriodicDuration prometheus.Histogram
|
||||
@@ -91,6 +92,15 @@ func NewSchedulerMetrics(r prometheus.Registerer) *Scheduler {
|
||||
},
|
||||
[]string{"org"},
|
||||
),
|
||||
SimpleNotificationRules: promauto.With(r).NewGaugeVec(
|
||||
prometheus.GaugeOpts{
|
||||
Namespace: Namespace,
|
||||
Subsystem: Subsystem,
|
||||
Name: "simple_routing_rules",
|
||||
Help: "The number of alert rules using simplified routing.",
|
||||
},
|
||||
[]string{"org"},
|
||||
),
|
||||
// TODO: partition on rule group as well as tenant, similar to loki|cortex.
|
||||
GroupRules: promauto.With(r).NewGaugeVec(
|
||||
prometheus.GaugeOpts{
|
||||
|
||||
Reference in New Issue
Block a user