IF (min((node_filesystem_size{device!=\"rootfs\"} - node_filesystem_free{device!=\"rootfs\"}) / node_filesystem_size{device!=\"rootfs\"})) *100 > 80
FOR 10m
LABELS { severity = "high" }
ANNOTATIONS {
summary = "High Disk Usage on {{ $labels.instance }}",
description = "{{ $labels.instance }} has high Disk Usage for about 10 m (current value: {{ $value }}s)",
}
Is it possible to use variable in the LABELS like so
LABELS { severity = "high", env = "{{ $labels.env }}" }
--
You received this message because you are subscribed to the Google Groups "Prometheus Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to prometheus-users+unsubscribe@googlegroups.com.
To post to this group, send email to prometheus-users@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/prometheus-users/caafeef3-24bf-421b-8c35-71be9f8b8a88%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
route:
group_by: [job, cluster, alertname]
group_wait: 30s
group_interval: 2m
repeat_interval: 3h
# If an alert isn't caught by a route, send email.
receiver: default
routes:
# Send severity=critical alerts to the pager.
- match:
severity: critical
env: prod
receiver: teamx-pager
- match:
severity: high
env: prod
receiver: teamx-email
- match:
severity: warning
env: prod
receiver: teamx-email
- match:
severity: critical
env: qa
receiver: teamx-pager
- match:
severity: high
env: qa
receiver: teamx-email
- match:
severity: warning
env: prod
receiver: teamx-email
- match:
severity: critical
env: dev
receiver: teamx-email
- match:
severity: high
env: qa
receiver: teamx-email
- match:
severity: warning
env: prod
receiver: teamx-email
inhibit_rules:
- source_match:
severity: 'critical'
target_match:
severity: 'warning'
# Apply inhibition if the alertname is the same.
equal: ['alertname', 'cluster', 'job']
receivers:
- name: teamx-pager
pagerduty_configs:
- service_key: {{ pagerdutykey }}
send_resolved: true
- name: devops-email
email_configs:
- to: 'teamx...@one.verizon.com'
send_resolved: true
- name: default
email_configs:
- to: 'dev...@one.verizon.com'
send_resolved: true
On 17 February 2017 at 21:43, Meher Garda <meher...@gmail.com> wrote:HII have an alertIF (min((node_filesystem_size{device!=\"rootfs\"} - node_filesystem_free{device!=\"rootfs\"}) / node_filesystem_size{device!=\"rootfs\"})) *100 > 80
FOR 10m
LABELS { severity = "high" }
ANNOTATIONS {
summary = "High Disk Usage on {{ $labels.instance }}",
description = "{{ $labels.instance }} has high Disk Usage for about 10 m (current value: {{ $value }}s)",
}
Is it possible to use variable in the LABELS like so
LABELS { severity = "high", env = "{{ $labels.env }}" }
You can, however that's redundant as all labels will be passed on by default.Brian
--
You received this message because you are subscribed to the Google Groups "Prometheus Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to prometheus-use...@googlegroups.com.
To post to this group, send email to promethe...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/prometheus-users/caafeef3-24bf-421b-8c35-71be9f8b8a88%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Hi BrianThe reason I ask is because in the alertmanager we have routes which depend on combination of severity and environment labels. My understanding is that routing happens on the basis of the label key/value pairs in the alert definition.Hence an alert with labelsLABELS { severity = "high", env = "{{ $labels.env }}" }will get routed properly according to the following routing configuration. is my understanding/expectation correct?
To unsubscribe from this group and stop receiving emails from it, send an email to prometheus-users+unsubscribe@googlegroups.com.
To post to this group, send email to prometheus-users@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/prometheus-users/f00d94ce-d456-4006-bbb2-a0c0ed79522d%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/prometheus-users/f00d94ce-d456-4006-bbb2-a0c0ed79522d%40googlegroups.com.