Skip to content

Instantly share code, notes, and snippets.

@FUSAKLA
Created March 9, 2018 20:56
Show Gist options
  • Save FUSAKLA/085c57645c45ddb213dc09bfa9552d15 to your computer and use it in GitHub Desktop.
Save FUSAKLA/085c57645c45ddb213dc09bfa9552d15 to your computer and use it in GitHub Desktop.
Fixed example of configmap containing prometheus rules and alerts config
apiVersion: v1
data:
prometheus.rules: |
# TODO add rules
prometheus.alerts: |
# host rules
ALERT high_node_load
IF node_load1 > 20
FOR 10s
LABELS { severity = "critical" }
ANNOTATIONS {
# summary defines the status if the condition is met
summary = "Node usage exceeded threshold",
# description reports the situtation of event
description = "Instance {{ $labels.instance }}, Job {{ $labels.job }}, Node load {{ $value }}",
}
kind: ConfigMap
metadata:
creationTimestamp: null
name: prometheus-rules
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment