| 1 |
# Prometheus Monitoring Mixin for etcd |
| 2 |
|
| 3 |
> NOTE: This project is *alpha* stage. Flags, configuration, behaviour and design may change significantly in following releases. |
| 4 |
|
| 5 |
A set of customisable Prometheus alerts for etcd. |
| 6 |
|
| 7 |
Instructions for use are the same as the [kubernetes-mixin](https://github.com/kubernetes-monitoring/kubernetes-mixin). |
| 8 |
|
| 9 |
## Background |
| 10 |
|
| 11 |
* For more information about monitoring mixins, see this [design doc](https://docs.google.com/document/d/1A9xvzwqnFVSOZ5fD3blKODXfsat5fg6ZhnKu9LK3lB4/edit#). |
| 12 |
|
| 13 |
## Testing alerts |
| 14 |
|
| 15 |
Make sure to have [jsonnet](https://jsonnet.org/) and [gojsontoyaml](https://github.com/brancz/gojsontoyaml) installed. |
| 16 |
|
| 17 |
First compile the mixin to a YAML file, which the promtool will read: |
| 18 |
``` |
| 19 |
jsonnet -e '(import "mixin.libsonnet").prometheusAlerts' | gojsontoyaml > mixin.yaml |
| 20 |
``` |
| 21 |
|
| 22 |
Then run the unit test: |
| 23 |
``` |
| 24 |
promtool test rules test.yaml |
| 25 |
``` |