Rework the postgres_mixing dashboard to be more composable. The goal is for this to be more maintainable long term. I don't know jsonnet very well, but following other projects, this appears to be in line. This replaces the postgres-overview.json dashboard with an overview.json dashboard with the same panels. While the dashboard does not match perfectly, it does include the same data but with the correct metrics. Signed-off-by: Joe Adams <github@joeadams.io> |
||
---|---|---|
.. | ||
alerts | ||
dashboards | ||
.gitignore | ||
config.libsonnet | ||
dashboards.jsonnet | ||
go.mod | ||
jsonnetfile.json | ||
jsonnetfile.lock.json | ||
Makefile | ||
mixin.libsonnet | ||
README.md |
Postgres Mixin
This is a work in progress. We aim for it to become a good role model for alerts and dashboards eventually, but it is not quite there yet.
The Postgres Mixin is a set of configurable, reusable, and extensible alerts and dashboards based on the metrics exported by the Postgres Exporter. The mixin creates recording and alerting rules for Prometheus and suitable dashboard descriptions for Grafana.
To use them, you need to have mixtool
and jsonnetfmt
installed. If you
have a working Go development environment, it's easiest to run the following:
$ go get github.com/monitoring-mixins/mixtool/cmd/mixtool
$ go get github.com/google/go-jsonnet/cmd/jsonnetfmt
You can then build the Prometheus rules files alerts.yaml
and
rules.yaml
and a directory dashboard_out
with the JSON dashboard files
for Grafana:
$ make build
For more advanced uses of mixins, see https://github.com/monitoring-mixins/docs.