Usagestats: Add stat group for alert rule groups (#78825)
* Add rule group support to usagestats service * Quote column name
This commit is contained in:
@@ -185,6 +185,9 @@ var (
|
||||
// StatsTotalAlertRules is a metric of total number of alert rules stored in Grafana.
|
||||
StatsTotalAlertRules prometheus.Gauge
|
||||
|
||||
// StatsTotalRuleGroups is a metric of total number of alert rule groups stored in Grafana.
|
||||
StatsTotalRuleGroups prometheus.Gauge
|
||||
|
||||
// StatsTotalDashboardVersions is a metric of total number of dashboard versions stored in Grafana.
|
||||
StatsTotalDashboardVersions prometheus.Gauge
|
||||
|
||||
@@ -554,6 +557,12 @@ func init() {
|
||||
Namespace: ExporterName,
|
||||
})
|
||||
|
||||
StatsTotalRuleGroups = prometheus.NewGauge(prometheus.GaugeOpts{
|
||||
Name: "stat_totals_rule_groups",
|
||||
Help: "total amount of alert rule groups in the database",
|
||||
Namespace: ExporterName,
|
||||
})
|
||||
|
||||
MAccessPermissionsSummary = prometheus.NewHistogram(prometheus.HistogramOpts{
|
||||
Name: "access_permissions_duration",
|
||||
Help: "Histogram for the runtime of permissions check function.",
|
||||
@@ -708,6 +717,7 @@ func initMetricVars() {
|
||||
StatsTotalDashboardVersions,
|
||||
StatsTotalAnnotations,
|
||||
StatsTotalAlertRules,
|
||||
StatsTotalRuleGroups,
|
||||
MAccessEvaluationCount,
|
||||
StatsTotalLibraryPanels,
|
||||
StatsTotalLibraryVariables,
|
||||
|
||||
Reference in New Issue
Block a user