Which chart:
Hello, how to define alerting rules (PrometheusRule) for a Prometheus instance?
I did not find anything like this in the chart templates.
It will be better using something like this:
additionalPrometheusRules:
- name: custom-rules-file
groups:
- name: prometheus-config
rules:
- alert: PrometheusConfigurationReload
expr: prometheus_config_last_reload_successful != 1
for: 5m
labels:
severity: error
annotations:
summary: "Prometheus configuration reload (instance {{ $labels.instance }})"
description: "Prometheus configuration reload error\n VALUE = {{ $value }}\n LABELS: {{ $labels }}"
- name: custom-node-exporter-rules
rules:
- alert: PhysicalComponentTooHot
expr: node_hwmon_temp_celsius > 75
for: 5m
labels:
severity: warning
annotations:
summary: "Physical component too hot (instance {{ $labels.instance }})"
description: "Physical hardware component too hot\n VALUE = {{ $value }}\n LABELS: {{ $labels }}"
- alert: NodeOvertemperatureAlarm
expr: node_hwmon_temp_alarm == 1
for: 5m
labels:
severity: critical
annotations:
summary: "Node overtemperature alarm (instance {{ $labels.instance }})"
description: "Physical node temperature alarm triggered\n VALUE = {{ $value }}\n LABELS: {{ $labels }}"
Hi @evgmoskalenko , thank you for your feedback, it makes all the sense. If you have a chance, could you try to open a PR and we will be happy to handle it and discuss there the exact implementation?
Hi @dani8art ,
Ok, I will do a PR. I didn't commit the public charts before, but that would be good practice :-)
This Issue has been automatically marked as "stale" because it has not had recent activity (for 15 days). It will be closed if no further activity occurs. Thanks for the feedback.
Hi,
Did you have time to work on that? any updates?
Yes, I will finish it, I will find the time soon. Distracted by work
This Issue has been automatically marked as "stale" because it has not had recent activity (for 15 days). It will be closed if no further activity occurs. Thanks for the feedback.
Due to the lack of activity in the last 5 days since it was marked as "stale", we proceed to close this Issue. Do not hesitate to reopen it later if necessary.
Most helpful comment
Yes, I will finish it, I will find the time soon. Distracted by work