Hi. In my prometheus.yml file all the targets necessarily have 2 labels viz
"cluster" and "node".
I have configured an alert for CPU Load with a dynamic threshold of "Number
of Cores of the server".
Configured alert:
- alert: HighCpuLoad
expr: (node_load15 > count without (cpu, mode)
(node_cpu_seconds_total{mode="system"})) * on(instance)
group_left(nodename) node_uname_info
for: 5m
labels:
severity: "CRITICAL"
annotations:
summary: "CPU load on *{{ $labels.instance }}* - *{{ $labels.nodename
}}* is more than number of cores of the machine."
description: "Current Value = *{{ $value | humanize }}*"
identifier: "*Cluster:* `{{ $labels.cluster }}`, *node:* `{{
$labels.node }}` "
Now, for a particular node value(Let it be A which belongs to X cluster) I
want this threshold to be 2*NumberofCores. How can I do this?
Thanks.
--
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 [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/prometheus-users/4d22d104-9984-4e2b-ad2a-0636b589b4bb%40googlegroups.com.