diff options
-rw-r--r-- | docs/node-mixin/README.md | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/docs/node-mixin/README.md b/docs/node-mixin/README.md new file mode 100644 index 0000000..489b599 --- /dev/null +++ b/docs/node-mixin/README.md | |||
@@ -0,0 +1,44 @@ | |||
1 | # Node Mixin | ||
2 | |||
3 | _This is work in progress. We aim for it to become a good role model for alerts | ||
4 | and dashboards eventually, but it is not quite there yet._ | ||
5 | |||
6 | The Node Mixin is a set of configurable, reusable, and extensible alerts and | ||
7 | dashboards based on the metrics exported by the Node Exporter. The mixin create | ||
8 | recording and alerting rules for Prometheus and suitable dashboard descriptions | ||
9 | for Grafana. | ||
10 | |||
11 | To use them, you need to have `jsonnet` (v0.13+) and `jb` installed. If you | ||
12 | have a working Go development environment, it's easiest to run the following: | ||
13 | ```bash | ||
14 | $ go get github.com/google/go-jsonnet/cmd/jsonnet | ||
15 | $ go get github.com/jsonnet-bundler/jsonnet-bundler/cmd/jb | ||
16 | ``` | ||
17 | |||
18 | _Note: The make targets `lint` and `fmt` need the `jsonnetfmt` binary, which is | ||
19 | currently not included in the Go implementation of `jsonnet`. For the time | ||
20 | being, you have to install the [C++ version of | ||
21 | jsonnetfmt](https://github.com/google/jsonnet) if you want to use `make lint` | ||
22 | or `make fmt`._ | ||
23 | |||
24 | Next, install the dependencies by running the following command in this | ||
25 | directory: | ||
26 | ```bash | ||
27 | $ jb install | ||
28 | ``` | ||
29 | |||
30 | You can then build the Prometheus rules files `node_alerts.yaml` and | ||
31 | `node_rules.yaml`: | ||
32 | ```bash | ||
33 | $ make node_alerts.yaml node_rules.yaml | ||
34 | ``` | ||
35 | |||
36 | You can also build a directory `dashboard_out` with the JSON dashboard files | ||
37 | for Grafana: | ||
38 | ```bash | ||
39 | $ make dashboards_out | ||
40 | ``` | ||
41 | |||
42 | For more advanced uses of mixins, see | ||
43 | https://github.com/monitoring-mixins/docs. | ||
44 | |||