• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..28-Apr-2020-

alerts/H28-Apr-2020-243242

dashboards/H28-Apr-2020-534519

rules/H28-Apr-2020-110109

.gitignoreH A D28-Apr-202051 54

MakefileH A D28-Apr-2020970 2920

README.mdH A D28-Apr-20201.5 KiB4837

alerts.jsonnetH A D28-Apr-202065 21

config.libsonnetH A D28-Apr-20202.5 KiB5346

dashboards.jsonnetH A D28-Apr-2020140 75

jsonnetfile.jsonH A D28-Apr-2020923 3534

mixin.libsonnetH A D28-Apr-2020145 54

rules.jsonnetH A D28-Apr-202064 21

README.md

1# Node Mixin
2
3_This is a work in progress. We aim for it to become a good role model for alerts
4and dashboards eventually, but it is not quite there yet._
5
6The Node Mixin is a set of configurable, reusable, and extensible alerts and
7dashboards based on the metrics exported by the Node Exporter. The mixin creates
8recording and alerting rules for Prometheus and suitable dashboard descriptions
9for Grafana.
10
11To use them, you need to have `jsonnet` (v0.13+) and `jb` installed. If you
12have 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
19currently not included in the Go implementation of `jsonnet`. For the time
20being, you have to install the [C++ version of
21jsonnetfmt](https://github.com/google/jsonnet) if you want to use `make lint`
22or `make fmt`._
23
24Next, install the dependencies by running the following command in this
25directory:
26```bash
27$ jb install
28```
29
30You 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
36You can also build a directory `dashboard_out` with the JSON dashboard files
37for Grafana:
38```bash
39$ make dashboards_out
40```
41
42Note that some of the generated dashboards require recording rules specified in
43the previously generated `node_rules.yaml`.
44
45For more advanced uses of mixins, see
46https://github.com/monitoring-mixins/docs.
47
48