Revision be8b10f5ee295cfa072da9666a8f0c9f6ee6f694 authored by Matthew Jacobson on 08 June 2023, 22:59:54 UTC, committed by Santiago on 28 June 2023, 19:50:49 UTC
* Alerting: Repurpose rule testing endpoint to return potential alerts

This feature replaces the existing no-longer in-use grafana ruler testing API endpoint /api/v1/rule/test/grafana. The new endpoint returns a list of potential alerts created by the given alert rule, including built-in + interpolated labels and annotations.

The key priority of this endpoint is that it is intended to be as true as possible to what would be generated by the ruler except that the resulting alerts are not filtered to only Resolved / Firing and ready to be sent.

This means that the endpoint will, among other things:

- Attach static annotations and labels from the rule configuration to the alert instances.
- Attach dynamic annotations from the datasource to the alert instances.
- Attach built-in labels and annotations created by the Grafana Ruler (such as alertname and grafana_folder) to the alert instances.
- Interpolate templated annotations / labels and accept allowed template functions.

(cherry picked from commit ba3994d33877049909819add70cc3d1bf1033cc7)
1 parent e250d51
History
File Mode Size
.bingo
.changelog-archive
.github
.husky
.vim
.vscode
.yarn
conf
contribute
cue.mod
devenv
docs
e2e
emails
grafana-mixin
kinds
local
packages
packaging
pkg
plugins-bundled
public
scripts
tools
.betterer.results -rw-r--r-- 341.9 KB
.betterer.ts -rw-r--r-- 3.5 KB
.bra.toml -rw-r--r-- 584 bytes
.browserslistrc -rw-r--r-- 255 bytes
.dockerignore -rw-r--r-- 235 bytes
.drone.star -rw-r--r-- 2.2 KB
.drone.yml -rw-r--r-- 170.8 KB
.editorconfig -rw-r--r-- 453 bytes
.eslintignore -rw-r--r-- 376 bytes
.eslintrc -rw-r--r-- 3.1 KB
.gitattributes -rw-r--r-- 19 bytes
.gitignore -rw-r--r-- 3.9 KB
.golangci.toml -rw-r--r-- 3.6 KB
.linguirc -rw-r--r-- 557 bytes
.nvmrc -rw-r--r-- 9 bytes
.pa11yci-pr.conf.js -rw-r--r-- 3.9 KB
.pa11yci.conf.js -rw-r--r-- 3.5 KB
.prettierignore -rw-r--r-- 619 bytes
.prettierrc.js -rw-r--r-- 86 bytes
.yarnrc.yml -rw-r--r-- 1.9 KB
CHANGELOG.md -rw-r--r-- 528.0 KB
CODE_OF_CONDUCT.md -rw-r--r-- 3.1 KB
CONTRIBUTING.md -rw-r--r-- 4.8 KB
Dockerfile -rw-r--r-- 5.2 KB
GOVERNANCE.md -rw-r--r-- 12.6 KB
HALL_OF_FAME.md -rw-r--r-- 220 bytes
ISSUE_TRIAGE.md -rw-r--r-- 25.8 KB
LICENSE -rw-r--r-- 33.7 KB
LICENSING.md -rw-r--r-- 777 bytes
MAINTAINERS.md -rw-r--r-- 226 bytes
Makefile -rw-r--r-- 10.0 KB
NOTICE.md -rw-r--r-- 105 bytes
README.md -rw-r--r-- 3.0 KB
ROADMAP.md -rw-r--r-- 322 bytes
SECURITY.md -rw-r--r-- 1.5 KB
SUPPORT.md -rw-r--r-- 661 bytes
UPGRADING_DEPENDENCIES.md -rw-r--r-- 3.2 KB
WORKFLOW.md -rw-r--r-- 4.7 KB
babel.config.json -rw-r--r-- 1.4 KB
build.go -rw-r--r-- 182 bytes
crowdin.yml -rw-r--r-- 243 bytes
embed.go -rw-r--r-- 322 bytes
go.mod -rw-r--r-- 20.2 KB
go.sum -rw-r--r-- 322.8 KB
jest.config.js -rw-r--r-- 1.6 KB
latest.json -rw-r--r-- 55 bytes
lerna.json -rw-r--r-- 104 bytes
metadata.md -rw-r--r-- 0 bytes
package.json -rw-r--r-- 17.0 KB
stylelint.config.js -rw-r--r-- 1.5 KB
tsconfig.json -rw-r--r-- 601 bytes
yarn.lock -rw-r--r-- 1.2 MB

README.md

back to top