Alerting: a usage stat for ualerting (#34390)

collects `stats.alert_rules.count` , where alert_rules is the nextgen system
This commit is contained in:
Kyle Brandt
2021-05-19 10:31:25 -04:00
committed by GitHub
parent 559ce4db89
commit e291203528
5 changed files with 15 additions and 0 deletions
+1
View File
@@ -79,6 +79,7 @@ func GetSystemStats(query *models.GetSystemStatsQuery) error {
sb.Write(`(SELECT COUNT(id) FROM ` + dialect.Quote("annotation") + `) AS annotations,`)
sb.Write(`(SELECT COUNT(id) FROM ` + dialect.Quote("team") + `) AS teams,`)
sb.Write(`(SELECT COUNT(id) FROM ` + dialect.Quote("user_auth_token") + `) AS auth_tokens,`)
sb.Write(`(SELECT COUNT(id) FROM ` + dialect.Quote("alert_rule") + `) AS alert_rules,`)
sb.Write(roleCounterSQL())