You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/node-mixin/README.md
+45-1Lines changed: 45 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@ _This is a work in progress. We aim for it to become a good role model for alert
4
4
and dashboards eventually, but it is not quite there yet._
5
5
6
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 creates
7
+
dashboards based on the metrics exported by the Node Exporter and logs by Loki(optional). The mixin creates
8
8
recording and alerting rules for Prometheus and suitable dashboard descriptions
9
9
for Grafana.
10
10
@@ -40,3 +40,47 @@ the previously generated `node_rules.yaml`.
40
40
For more advanced uses of mixins, see
41
41
https://github.com/monitoring-mixins/docs.
42
42
43
+
## Loki Logs configuration
44
+
45
+
To enable logs support in Node Mixin, enable them in config.libsonnet first:
46
+
47
+
```
48
+
{
49
+
_config+:: {
50
+
enableLokiLogs: true,
51
+
},
52
+
}
53
+
54
+
```
55
+
56
+
then run
57
+
```bash
58
+
$ make build
59
+
```
60
+
61
+
This would generate extra Logs row on dashboards.
62
+
63
+
For proper logs correlation, you need to make sure that `job` and `instance` labels values match for both node_exporter metrics and logs, collected by [Promtail](https://grafana.com/docs/loki/latest/clients/promtail/) or [Grafana Agent](https://grafana.com/docs/grafana-cloud/agent/).
64
+
65
+
To scrape system logs, the following promtail config snippet can be used for `job=integrations/node` and `instance=host-01`:
0 commit comments