jsonnet: add general rules for up/down targets
This commit is contained in:
19
jsonnet/kube-prometheus/rules/general.libsonnet
Normal file
19
jsonnet/kube-prometheus/rules/general.libsonnet
Normal 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',
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
}
|
||||||
@@ -1 +1,2 @@
|
|||||||
(import 'node-rules.libsonnet')
|
(import 'node-rules.libsonnet') +
|
||||||
|
(import 'general.libsonnet')
|
||||||
|
|||||||
Reference in New Issue
Block a user