grafana/pkg
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
..
api Alerting: update rule versions on folder move (#88376) 2024-08-13 12:26:26 +02:00
apimachinery Identity: Remove typed id (#91801) 2024-08-13 10:18:28 +02:00
apis APIServer: Make TableConverter part of ResourceInfo (#91520) 2024-08-05 15:38:12 +03:00
apiserver Auth: use IdentityType from authlib (#91763) 2024-08-12 09:26:53 +03:00
build Bump grafana-azure-sdk-go and related dependencies (#91124) 2024-08-09 13:12:19 -04:00
bus Tracing: Standardize on otel tracing (#75528) 2023-10-03 14:54:20 +02:00
cmd QuotaService: refactor to use ReplDB for Get queries (#91333) 2024-08-08 13:41:33 -04:00
codegen chore(deps): Upgrade openapi dep, remove replace directive (#90609) 2024-07-18 14:42:18 -04:00
components Chore: Bump google.golang.org/grpc to 1.64.0 (#88219) 2024-05-27 12:44:39 +02:00
events Alerting: update rule versions on folder move (#88376) 2024-08-13 12:26:26 +02:00
expr Alerting: Support median in reduce expressions (#91119) 2024-08-01 15:04:17 +02:00
extensions K8s e2e tests: adds e2e package and 10 year certs (#91557) 2024-08-06 03:29:36 +03:00
generated Alerting: Receiver API Get+List+Delete (#90384) 2024-07-16 10:02:16 -04:00
ifaces/gcsifaces Chore: Upgrade Go to 1.19.1 (#54902) 2022-09-12 12:03:49 +02:00
infra QuotaService: refactor to use ReplDB for Get queries (#91333) 2024-08-08 13:41:33 -04:00
kinds Bookmarks: Store URLs instead of ids (#91121) 2024-07-31 13:56:39 +01:00
login/social Auth: Skip email extraction when api url is not present (#91699) 2024-08-09 18:20:54 +03:00
middleware Identity: Remove typed id (#91801) 2024-08-13 10:18:28 +02:00
mocks/mock_gcsifaces Chore: use any rather than interface{} (#74066) 2023-08-30 18:46:47 +03:00
models Chore: Move identity and errutil to apimachinery module (#89116) 2024-06-13 07:11:35 +03:00
modules Zanzana: Initial work to run openFGA as embedded or standalone service (#89211) 2024-06-18 10:04:18 +02:00
plugins Plugins: Update CLI check if plugin is already installed (#91213) 2024-08-06 09:21:40 +01:00
promlib Prometheus: Add support to make parallel queries (#90316) 2024-08-12 14:31:39 +02:00
registry Identity: Remove typed id (#91801) 2024-08-13 10:18:28 +02:00
semconv Semconv: Add k8s.dataplaneservice.name (#91714) 2024-08-09 04:39:37 -04:00
server RBAC: Add permission registry (#91247) 2024-08-02 09:32:06 +02:00
services Alerting: Add rule_group label to grafana_alerting_rule_group_rules metric (#88289) 2024-08-13 13:27:23 +02:00
setting Use dw dynamic config (#91222) 2024-08-13 10:03:28 +02:00
storage/unified Identity: Remove typed id (#91801) 2024-08-13 10:18:28 +02:00
tests Use dw dynamic config (#91222) 2024-08-13 10:03:28 +02:00
tsdb OpenTSDB: Fix test (#91761) 2024-08-09 19:53:04 +03:00
util Identity: Remove typed id (#91801) 2024-08-13 10:18:28 +02:00
web K8s: use contexthandler in standalone handler chain (#90102) 2024-07-08 12:22:10 -07:00
README.md Chore: Move all backend contribution documents to a single directory (#61140) 2023-01-11 11:16:52 +01:00
ruleguard.rules.go Chore: update all +build statements (#38782) 2021-09-01 17:38:56 +03:00

This directory contains the code for the Grafana backend.

The contributor documentation for Grafana's backend is in /contribute/backend/README.md.