jsonnet: add general rules for up/down targets

This commit is contained in:
Sergiusz Urbaniak
2020-01-29 18:04:26 +01:00
parent 68d6e611c6
commit 6b5033d65e
2 changed files with 21 additions and 1 deletions

View File

@@ -0,0 +1,19 @@
{
prometheusRules+:: {
groups+: [
{
name: 'kube-prometheus-general.rules',
rules: [
{
expr: 'count without(instance, pod, node) (up == 1)',
record: 'count:up1',
},
{
expr: 'count without(instance, pod, node) (up == 0)',
record: 'count:up0',
},
],
},
],
},
}

View File

@@ -1 +1,2 @@
(import 'node-rules.libsonnet')
(import 'node-rules.libsonnet') +
(import 'general.libsonnet')