c792af3ad0
Fix expression for GrafanaRequestsFailing alert The intent of the alert is to get the ratio of 5xx to all status codes [^1]. With the original expression, the left hand side can have more than one row with the same labels except for the status code. This results in a promql error because it is doing a many-to-one matching. Doing a sum on the left hand side first should preserve the intent of the alert and resolve the issue. [^1]: https://github.com/grafana/grafana/pull/43116 |
||
---|---|---|
.. | ||
alerts | ||
dashboards | ||
rules | ||
scripts | ||
.gitignore | ||
Makefile | ||
mixin.libsonnet | ||
README.md |
Grafana Mixin
This is a work in progress. We aim for it to become a good role model for alerts and dashboards eventually, but it is not quite there yet.
The Grafana Mixin is a set of configurable, reusable, and extensible alerts and dashboards based on the metrics exported by Grafana. The mixin creates recording and alerting rules for Prometheus and suitable dashboard descriptions for Grafana.
To use them, you need to have mixtool
and jsonnetfmt
installed. If you
have a working Go development environment, it's easiest to run the following:
$ go get github.com/monitoring-mixins/mixtool/cmd/mixtool
$ go get github.com/google/go-jsonnet/cmd/jsonnetfmt
You can then build the Prometheus rules files alerts.yaml
and
rules.yaml
and a directory dashboard_out
with the JSON dashboard files
for Grafana:
$ make build
For more advanced uses of mixins, see https://github.com/monitoring-mixins/docs.