This repository has been archived on 2023-04-02. You can view files and clone it, but cannot push or open issues or pull requests.
gitops-tbrnt/monitoring/vendor/github.com/kubernetes-monitoring/kubernetes-mixin/lib/absent_alert.libsonnet
Tobias Brunner 0108ac6084
All checks were successful
continuous-integration/drone/push Build is passing
upgrade monitoring - switch to prometheus-operator/kube-prometheus
2020-08-19 20:44:52 +02:00

19 lines
510 B
Plaintext

{
local absentAlert = self,
componentName:: error 'must provide component name',
selector:: error 'must provide selector for component',
alert: '%sDown' % absentAlert.componentName,
expr: |||
absent(up{%s} == 1)
||| % absentAlert.selector,
'for': '15m',
labels: {
severity: 'critical',
},
annotations: {
description: '%s has disappeared from Prometheus target discovery.' % absentAlert.componentName,
summary: 'Target disappeared from Prometheus target discovery.',
},
}