@cryptotaxi247 / netdata-1 / commits / 78b540bb7

health: add systemdunits alarms (#10906)

Ilya Mashchenko committed Apr 14, 2021 at 13:23 UTC 78b540bb75adc0298da08327a9aa95650540d2c5
2 files changed +113
health/Makefile.am
+1
@@ -90,6 +90,7 @@ dist_healthconfig_DATA = \
90 health.d/stiebeleltron.conf \
91 health.d/synchronization.conf \
92 health.d/swap.conf \
93 + health.d/systemdunits.conf \
94 health.d/tcp_conn.conf \
95 health.d/tcp_listen.conf \
96 health.d/tcp_mem.conf \
health/health.d/systemdunits.conf new
+112
@@ -0,0 +1,112 @@
1 +## Check if the are any systemd units in the failed state (crashed).
2 +## States: 1 - active, 2 - inactive, 3 - activating, 4 - deactivating, 5 - failed.
3 +
4 +## Service units
5 +template: systemd_service_units_state
6 + on: systemd.service_units_state
7 + lookup: max -1s min2max
8 + units: ok/failed
9 + every: 10s
10 + warn: $this != nan AND $this == 5
11 + delay: down 5m multiplier 1.5 max 1h
12 + info: one or more systemd service units are in the failed state
13 + to: sysadmin
14 +
15 +## Socket units
16 +template: systemd_socket_units_state
17 + on: systemd.socket_unit_state
18 + lookup: max -1s min2max
19 + units: ok/failed
20 + every: 10s
21 + warn: $this != nan AND $this == 5
22 + delay: down 5m multiplier 1.5 max 1h
23 + info: one or more systemd socket units are in the failed state
24 + to: sysadmin
25 +
26 +## Target units
27 +template: systemd_target_units_state
28 + on: systemd.target_unit_state
29 + lookup: max -1s min2max
30 + units: ok/failed
31 + every: 10s
32 + warn: $this != nan AND $this == 5
33 + delay: down 5m multiplier 1.5 max 1h
34 + info: one or more systemd target units are in the failed state
35 + to: sysadmin
36 +
37 +## Path units
38 +template: systemd_path_units_state
39 + on: systemd.path_unit_state
40 + lookup: max -1s min2max
41 + units: ok/failed
42 + every: 10s
43 + warn: $this != nan AND $this == 5
44 + delay: down 5m multiplier 1.5 max 1h
45 + info: one or more systemd path units are in the failed state
46 + to: sysadmin
47 +
48 +## Device units
49 +template: systemd_device_units_state
50 + on: systemd.device_unit_state
51 + lookup: max -1s min2max
52 + units: ok/failed
53 + every: 10s
54 + warn: $this != nan AND $this == 5
55 + delay: down 5m multiplier 1.5 max 1h
56 + info: one or more the systemd device units are in the failed state
57 + to: sysadmin
58 +
59 +## Mount units
60 +template: systemd_mount_units_state
61 + on: systemd.mount_unit_state
62 + lookup: max -1s min2max
63 + units: ok/failed
64 + every: 10s
65 + warn: $this != nan AND $this == 5
66 + delay: down 5m multiplier 1.5 max 1h
67 + info: one or more the systemd mount units are in the failed state
68 + to: sysadmin
69 +
70 +## Automount units
71 +template: systemd_automount_units_state
72 + on: systemd.automount_unit_state
73 + lookup: max -1s min2max
74 + units: ok/failed
75 + every: 10s
76 + warn: $this != nan AND $this == 5
77 + delay: down 5m multiplier 1.5 max 1h
78 + info: one or more systemd automount units are in the failed state
79 + to: sysadmin
80 +
81 +## Swap units
82 +template: systemd_swap_units_state
83 + on: systemd.swap_unit_state
84 + lookup: max -1s min2max
85 + units: ok/failed
86 + every: 10s
87 + warn: $this != nan AND $this == 5
88 + delay: down 5m multiplier 1.5 max 1h
89 + info: one or more systemd swap units are in the failed state
90 + to: sysadmin
91 +
92 +## Scope units
93 +template: systemd_scope_units_state
94 + on: systemd.scope_unit_state
95 + lookup: max -1s min2max
96 + units: ok/failed
97 + every: 10s
98 + warn: $this != nan AND $this == 5
99 + delay: down 5m multiplier 1.5 max 1h
100 + info: one or more systemd scope units are in the failed state
101 + to: sysadmin
102 +
103 +## Slice units
104 +template: systemd_slice_units_state
105 + on: systemd.slice_unit_state
106 + lookup: max -1s min2max
107 + units: ok/failed
108 + every: 10s
109 + warn: $this != nan AND $this == 5
110 + delay: down 5m multiplier 1.5 max 1h
111 + info: one or more systemd slice units are in the failed state
112 + to: sysadmin