Add AptUpgradesPending alert
This commit is contained in:
parent
17f40221b6
commit
4ffb1d7f2e
2 changed files with 16 additions and 1 deletions
|
|
@ -260,3 +260,16 @@ prometheus_agent:
|
||||||
annotations:
|
annotations:
|
||||||
title: '{%raw%}{{ $labels.instance }}: Uptime{%endraw%}'
|
title: '{%raw%}{{ $labels.instance }}: Uptime{%endraw%}'
|
||||||
description: "Uptime is more than 30 days, please reboot soon"
|
description: "Uptime is more than 30 days, please reboot soon"
|
||||||
|
AptUpgradesPending:
|
||||||
|
group: nodeexporter
|
||||||
|
enabled: True
|
||||||
|
alert: UpgradesPending
|
||||||
|
expr: |
|
||||||
|
sum(apt_upgrades_pending{job="node", instance="{{ inventory_hostname }}"}) > 0 or
|
||||||
|
sum(apt_upgrades_held{job="node", instance="{{ inventory_hostname }}"}) > 0
|
||||||
|
for: 25h
|
||||||
|
labels:
|
||||||
|
severity: warning
|
||||||
|
annotations:
|
||||||
|
title: '{%raw%}{{ $labels.instance }}: AptUpgradesPending{%endraw%}'
|
||||||
|
description: "Upgrades pending for more than 24 hours"
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,8 @@
|
||||||
- name: install node-exporter
|
- name: install node-exporter
|
||||||
apt:
|
apt:
|
||||||
pkg: prometheus-node-exporter
|
pkg:
|
||||||
|
- prometheus-node-exporter
|
||||||
|
- prometheus-node-exporter-collectors
|
||||||
|
|
||||||
- name: copy node-exporter config
|
- name: copy node-exporter config
|
||||||
notify: restart node-exporter
|
notify: restart node-exporter
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue