jsonnet mixins for grafana dashboards, alertmanager rules and prometheus/mimir recordingrules
- Jsonnet 97.5%
- Just 2.5%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
| node-exporter | ||
| node-exporter-compiled | ||
| .gitignore | ||
| .pre-commit-config.yaml | ||
| devbox.json | ||
| devbox.lock | ||
| justfile | ||
| LICENSE | ||
| README.md | ||
Monitoring mixins
Collection of monitoring mixins
Requirements
- jsonnet
- jsonnet-bundler
Customising the mixin
Ensure you installed the listed packages above
Create a new directory and initilize jsonnet-bundler
jb init
Install the mixin you want to customize
jb install https://codeberg.org/cayne/monitoring-mixins/node-exporter@main
Then create a mixin.libsonnet file to customize the mixin
For example:
local nodeExporter = import 'codeberg.org/cayne/monitoring-mixins/node-exporter/mixin.libsonnet';
nodeExporter {
_config+:: {
nodeExporterSelector: 'node',
},
}
Now you can generate the dashboards, alerting and recording rules
mkdir -p compiled/dashboards
jsonnet -J vendor -m compiled/dashboards -e '(import "mixin.libsonnet").grafanaDashboards'
jsonnet -J vendor -S -e 'std.manifestYamlDoc((import "mixin.libsonnet").prometheusRules)' > compiled/rules.yml
jsonnet -J vendor -S -e 'std.manifestYamlDoc((import "mixin.libsonnet").prometheusAlerts)' > compiled/alerts.yml
Development
Requirements
- devbox or all packages listed in
devbox.json
Clone this repository
git clone https://codeberg.org/cayne/monitoring-mixins
Enter devbox shell
devbox shell
Generate node exporter mixin
just generate-all node-exporter