grafana/pkg/services
Alexander Akhmetov 149f02aebe
Alerting: Add rule_group label to grafana_alerting_rule_group_rules metric (#88289)
* Alerting: Add rule_group label to grafana_alerting_rule_group_rules metric (#62361)

* Alerting: Delete rule group metrics when the rule group is deleted

This commit addresses the issue where the GroupRules metric (a GaugeVec)
keeps its value and is not deleted when an alert rule is removed from the rule registry.
Previously, when an alert rule with orgID=1 was active, the metric was:

  grafana_alerting_rule_group_rules{org="1",state="active"} 1

However, after deleting this rule, subsequent calls to updateRulesMetrics
did not update the gauge value, causing the metric to incorrectly remain at 1.

The fix ensures that when updateRulesMetrics is called it
also deletes the group rule metrics with the corresponding label values if needed.
2024-08-13 13:27:23 +02:00
..
accesscontrol Identity: Remove typed id (#91801) 2024-08-13 10:18:28 +02:00
annotations Alerting: update rule versions on folder move (#88376) 2024-08-13 12:26:26 +02:00
anonymous Identity: Remove typed id (#91801) 2024-08-13 10:18:28 +02:00
apikey Chore: Move identity and errutil to apimachinery module (#89116) 2024-06-13 07:11:35 +03:00
apiserver Use dw dynamic config (#91222) 2024-08-13 10:03:28 +02:00
auth Identity: Remove typed id (#91801) 2024-08-13 10:18:28 +02:00
authn Identity: Remove typed id (#91801) 2024-08-13 10:18:28 +02:00
authz Identity: Remove typed id (#91801) 2024-08-13 10:18:28 +02:00
caching Fixing typos (#70487) 2023-06-22 09:43:38 +01:00
cleanup Dashboards: Add feature restore dashboards backend (#83131) 2024-05-16 14:36:26 -03:00
cloudmigration CloudMigrations: Misc cleanup before codefreeze (#91725) 2024-08-09 17:38:08 +03:00
contexthandler Identity: Remove typed id (#91801) 2024-08-13 10:18:28 +02:00
correlations Zanzana: Evaluate permissions alongside with RBAC engine (#90064) 2024-07-05 11:31:23 +02:00
dashboardimport Identity: remove GetTypedID (#91745) 2024-08-09 18:20:24 +03:00
dashboards Alerting: update rule versions on folder move (#88376) 2024-08-13 12:26:26 +02:00
dashboardsnapshots Identity: Remove typed id (#91801) 2024-08-13 10:18:28 +02:00
dashboardversion Chore: removing (more) redundant transactions (#89373) 2024-06-25 09:19:49 -04:00
datasourceproxy Plugins: Preserve trailing slash in plugin proxy (#86859) 2024-06-05 13:36:14 +02:00
datasources RBAC: Allow omitting default permissions when a new resource is created (#90720) 2024-07-24 19:31:26 +03:00
encryption Tracing: Various improvements (#88308) 2024-05-27 14:21:40 +02:00
extsvcauth Chore: Move identity and errutil to apimachinery module (#89116) 2024-06-13 07:11:35 +03:00
featuremgmt Plugins: Plugin details right panel is added. All the details were moved from thee top to the right panel (#90325) 2024-08-13 11:55:30 +02:00
folder Alerting: update rule versions on folder move (#88376) 2024-08-13 12:26:26 +02:00
gcom Cloud migrations: create route to delete token (#88297) 2024-05-31 10:03:43 -03:00
grpcserver Unified Storage: Propagate traces from the apiserver grpc client (#91226) 2024-08-06 09:52:11 -06:00
guardian Identity: remove GetTypedID (#91745) 2024-08-09 18:20:24 +03:00
hooks Hooks: Remove AddLoginHook and RunLogin hooks (#73227) 2023-08-17 09:51:45 +02:00
kmsproviders Secrets: Make the Migrator extensible (#67307) 2023-06-19 23:44:01 +02:00
ldap Zanzana: Evaluate permissions alongside with RBAC engine (#90064) 2024-07-05 11:31:23 +02:00
libraryelements Alerting: update rule versions on folder move (#88376) 2024-08-13 12:26:26 +02:00
librarypanels Alerting: update rule versions on folder move (#88376) 2024-08-13 12:26:26 +02:00
licensing Navigation: Remove ApplyAdminIA logic (#89113) 2024-06-12 16:45:13 +01:00
live Identity: Remove typed id (#91801) 2024-08-13 10:18:28 +02:00
login Chore: Move identity and errutil to apimachinery module (#89116) 2024-06-13 07:11:35 +03:00
loginattempt Chore: Add login protection when user is trying different uppercase letters (#87588) 2024-05-10 13:49:59 +02:00
navtree Navigation: Remove grafana-aws-app from Infrastructure navigation (#91524) 2024-08-13 11:54:30 +03:00
ngalert Alerting: Add rule_group label to grafana_alerting_rule_group_rules metric (#88289) 2024-08-13 13:27:23 +02:00
notifications notifications: Fix flaky SMTP tests (#90801) 2024-07-23 08:22:00 -04:00
oauthtoken Identity: Remove typed id (#91801) 2024-08-13 10:18:28 +02:00
org QuotaService: refactor to use ReplDB for Get queries (#91333) 2024-08-08 13:41:33 -04:00
playlist Chore: Update test database initialization (#81673) 2024-02-09 09:35:39 -05:00
plugindashboards chore(perf): Pre-allocate where possible (enable prealloc linter) (#88952) 2024-06-14 14:16:36 -04:00
pluginsintegration Identity: Remove typed id (#91801) 2024-08-13 10:18:28 +02:00
preference Bookmarks: Store URLs instead of ids (#91121) 2024-07-31 13:56:39 +01:00
provisioning Alerting: Support for optimistic concurrency in priovisioning Tempate API (#91195) 2024-08-09 11:40:07 -04:00
publicdashboards DashboardStore: Use ReplDB and get dashboard quotas from the ReadReplica (#90235) 2024-07-12 10:47:49 -04:00
query Chore: Move identity and errutil to apimachinery module (#89116) 2024-06-13 07:11:35 +03:00
queryhistory Explore: Check for RBAC permissions when hitting query history endpoints (#91156) 2024-07-31 12:10:52 -06:00
quota QuotaService: refactor to use ReplDB for Get queries (#91333) 2024-08-08 13:41:33 -04:00
rendering Chore: Move identity and errutil to apimachinery module (#89116) 2024-06-13 07:11:35 +03:00
screenshot Chore: Refactor render via http (#84613) 2024-05-14 07:24:18 -03:00
search chore(tracing): add tracing for frontend and db session (#91509) 2024-08-05 17:17:39 -08:00
searchusers Chore: Move identity and errutil to apimachinery module (#89116) 2024-06-13 07:11:35 +03:00
searchV2 search v2: pre-allocate dashboardQueryResult slice capacity for performance (#91536) 2024-08-05 13:54:57 -04:00
secrets Refactor plugin context initialization (#88343) 2024-05-28 16:59:06 +03:00
serviceaccounts Identity: Remove typed id (#91801) 2024-08-13 10:18:28 +02:00
shorturls Chore: Move identity and errutil to apimachinery module (#89116) 2024-06-13 07:11:35 +03:00
signingkeys Chore: Move identity and errutil to apimachinery module (#89116) 2024-06-13 07:11:35 +03:00
sqlstore add team_member index on user_id org_id (#91819) 2024-08-13 13:58:00 +03:00
ssosettings Zanzana: Evaluate permissions alongside with RBAC engine (#90064) 2024-07-05 11:31:23 +02:00
star Identity: remove GetTypedID (#91745) 2024-08-09 18:20:24 +03:00
stats Experimental Feature Toggle: databaseReadReplica (#89232) 2024-06-18 11:07:15 -04:00
store Storage: Remove entity store (#91233) 2024-07-31 09:25:39 +03:00
supportbundles Chore: Move identity and errutil to apimachinery module (#89116) 2024-06-13 07:11:35 +03:00
tag Chore: Update test database initialization (#81673) 2024-02-09 09:35:39 -05:00
team Identity: Remove typed id (#91801) 2024-08-13 10:18:28 +02:00
temp_user Chore: removing (more) redundant transactions (#89373) 2024-06-25 09:19:49 -04:00
updatechecker Chore: Making versioncheck url rely on config instead of being hardcoded (#85855) 2024-04-11 12:04:53 +02:00
user Identity: Remove typed id (#91801) 2024-08-13 10:18:28 +02:00
validations chore: move validations model into the validations service (#61953) 2023-01-23 15:10:14 -05:00