mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00

Fix mixin cluster parameter otherwise generated mixins looks like this: ```json {"type":"prometheus","uid":"${datasource}"},"label":"cluster","name":"job","query":"label_values(etcd_server_has_leader{job=~\".*etcd.*\"}, job)","refresh":2,"type":"query"}]},"time":{"from":"now-15m","to":"now"},"timezone": "`}}{{ .Values.grafana.defaultDashboardsTimezone }}{{`","title":"etcd","uid":"c2f4e12cdf69feb95caa41a5a1b423d9"}`}} ``` where name is job when the variable name used in dashboard queries is cluster. Signed-off-by: QuentinBisson <quentin@giantswarm.io>
Prometheus Monitoring Mixin for etcd
NOTE: This project is alpha stage. Flags, configuration, behaviour and design may change significantly in following releases.
A customisable set of Grafana dashboard and Prometheus alerts for etcd.
Instructions for use are the same as the kubernetes-mixin.
Grafana 7.x support
By default, this mixin generates the dashboard compatible with Grafana 8.x or newer. To generate dashboard for Grafana 7.x, set in the config.libsonnet:
// set to true if dashboards should be compatible with Grafana 7x or earlier
grafana7x: true,
Background
- For more information about monitoring mixins, see this design doc.
Testing alerts
Make sure to have jsonnet and gojsontoyaml installed. You can fetch it via
make tools
First compile the mixin to a YAML file, which the promtool will read:
make manifests
Then run the unit test:
promtool test rules test.yaml