2 years ago
#71807
Rajendar Talatam
how to configure nodename as label in the prometheus alert
I have Prometheus alert , I need node Name in the labels
- alert: example-alert
annotations:
description: Memory on node currently at %
is under pressure
summary: Memory usage is under pressure, system may become unstable.
expr: |
100 - ((node_memory_MemAvailable_bytes{job="node-exporter"} * 100) / node_memory_MemTotal_bytes{job="node-exporter"}) > 50
for: 2m
labels:
nodeName:
severity: warning
{endpoint="metrics",instance="172.16.17.100:9100",job="node-exporter",namespace="monitoring",pod="mypromoperator-prometheus-node-exporter-gg5nl",service="mypromoperator-prometheus-node-exporter"} 67.09431138997289
{endpoint="metrics",instance="172.16.17.101:9100",job="node-exporter",namespace="monitoring",pod="mypromoperator-prometheus-node-exporter-9mfn2",service="mypromoperator-prometheus-node-exporter"} 52.7483247365166e
but want to see node name n the query , how to configure alert so that I will get node name
prometheus
prometheus-alertmanager
0 Answers
Your Answer