You've already forked postgres_exporter
mirror of
https://github.com/prometheus-community/postgres_exporter.git
synced 2025-08-05 06:21:12 +03:00
feat(mixin): Add grafana mixins support for postgres exporter
Signed-off-by: Kaviraj <kavirajkanagaraj@gmail.com>
This commit is contained in:
13
postgres_mixin/mixin.libsonnet
Normal file
13
postgres_mixin/mixin.libsonnet
Normal file
@@ -0,0 +1,13 @@
|
||||
{
|
||||
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'),
|
||||
}
|
Reference in New Issue
Block a user