1
0
mirror of https://github.com/prometheus-community/postgres_exporter.git synced 2025-08-06 17:22:43 +03:00

postgres_mixin: jsonnify alerts file

Signed-off-by: Paweł Krupa (paulfantom) <pawel@krupa.net.pl>
This commit is contained in:
Paweł Krupa (paulfantom)
2022-04-10 15:36:24 +02:00
parent 7e02b9bd9b
commit 4e78805496
5 changed files with 91 additions and 70 deletions

View File

@@ -1,13 +1,2 @@
{
grafanaDashboards: {
'postgres-overview.json': (import 'dashboards/postgres-overview.json'),
},
// Helper function to ensure that we don't override other rules, by forcing
// the patching of the groups list, and not the overall rules object.
local importRules(rules) = {
groups+: std.native('parseYaml')(rules)[0].groups,
},
prometheusAlerts+: importRules(importstr 'alerts/alerts.yaml'),
}
(import 'alerts/alerts.libsonnet') +
(import 'dashboards/dashboards.libsonnet')