Created
January 25, 2019 05:41
-
-
Save wzhliang/d2f72d0c7b528fc91fca0829d862a781 to your computer and use it in GitHub Desktop.
Prometheus operator alert rule
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: monitoring.coreos.com/v1 | |
kind: PrometheusRule | |
metadata: | |
labels: | |
prometheus: service-prometheus | |
role: alert-rules | |
name: prometheus-service-rules | |
namespace: monitoring | |
spec: | |
groups: | |
- name: general.rules | |
rules: | |
- alert: TargetDown-serviceprom | |
annotations: | |
description: '{{ $value }}% of {{ $labels.job }} targets are down.' | |
summary: Targets are down | |
expr: 100 * (count(up == 0) BY (job) / count(up) BY (job)) > 10 | |
for: 10m | |
labels: | |
severity: warning | |
- alert: DeadMansSwitch-serviceprom | |
annotations: | |
description: This is a DeadMansSwitch meant to ensure that the entire Alerting | |
pipeline is functional. | |
summary: Alerting DeadMansSwitch | |
expr: vector(1) | |
labels: | |
severity: none |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment