@cryptotaxi247 / netdata-1 / commits / c93e585f3

adjust systemdunits alarms (#13623)

Ilya Mashchenko committed Sep 14, 2022 at 15:12 UTC c93e585f38be8ca388fe7dff0cafb284ed9f831e
1 file changed +52 -53
health/health.d/systemdunits.conf
+52 -53
@@ -1,142 +1,141 @@
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.
1 +# you can disable an alarm notification by setting the 'to' line to: silent
2
3 ## Service units
5 - template: systemd_service_units_state
6 - on: systemd.service_units_state
4 + template: systemd_service_unit_failed_state
5 + on: systemd.service_unit_state
6 class: Errors
7 type: Linux
8 component: Systemd units
10 - lookup: max -1s min2max
11 - units: ok/failed
9 + calc: $failed
10 + units: state
11 every: 10s
13 - warn: $this != nan AND $this == 5
12 + warn: $this != nan AND $this == 1
13 delay: down 5m multiplier 1.5 max 1h
15 - info: one or more systemd service units are in the failed state
14 + info: systemd service unit in the failed state
15 to: sysadmin
16
17 ## Socket units
19 - template: systemd_socket_units_state
18 + template: systemd_socket_unit_failed_state
19 on: systemd.socket_unit_state
20 class: Errors
21 type: Linux
22 component: Systemd units
24 - lookup: max -1s min2max
25 - units: ok/failed
23 + calc: $failed
24 + units: state
25 every: 10s
27 - warn: $this != nan AND $this == 5
26 + warn: $this != nan AND $this == 1
27 delay: down 5m multiplier 1.5 max 1h
29 - info: one or more systemd socket units are in the failed state
28 + info: systemd socket unit in the failed state
29 to: sysadmin
30
31 ## Target units
33 - template: systemd_target_units_state
32 + template: systemd_target_unit_failed_state
33 on: systemd.target_unit_state
34 class: Errors
35 type: Linux
36 component: Systemd units
38 - lookup: max -1s min2max
39 - units: ok/failed
37 + calc: $failed
38 + units: state
39 every: 10s
41 - warn: $this != nan AND $this == 5
40 + warn: $this != nan AND $this == 1
41 delay: down 5m multiplier 1.5 max 1h
43 - info: one or more systemd target units are in the failed state
42 + info: systemd target unit in the failed state
43 to: sysadmin
44
45 ## Path units
47 - template: systemd_path_units_state
46 + template: systemd_path_unit_failed_state
47 on: systemd.path_unit_state
48 class: Errors
49 type: Linux
50 component: Systemd units
52 - lookup: max -1s min2max
53 - units: ok/failed
51 + calc: $failed
52 + units: state
53 every: 10s
55 - warn: $this != nan AND $this == 5
54 + warn: $this != nan AND $this == 1
55 delay: down 5m multiplier 1.5 max 1h
57 - info: one or more systemd path units are in the failed state
56 + info: systemd path unit in the failed state
57 to: sysadmin
58
59 ## Device units
61 - template: systemd_device_units_state
60 + template: systemd_device_unit_failed_state
61 on: systemd.device_unit_state
62 class: Errors
63 type: Linux
64 component: Systemd units
66 - lookup: max -1s min2max
67 - units: ok/failed
65 + calc: $failed
66 + units: state
67 every: 10s
69 - warn: $this != nan AND $this == 5
68 + warn: $this != nan AND $this == 1
69 delay: down 5m multiplier 1.5 max 1h
71 - info: one or more the systemd device units are in the failed state
70 + info: systemd device unit in the failed state
71 to: sysadmin
72
73 ## Mount units
75 - template: systemd_mount_units_state
74 + template: systemd_mount_unit_failed_failed_state
75 on: systemd.mount_unit_state
76 class: Errors
77 type: Linux
78 component: Systemd units
80 - lookup: max -1s min2max
81 - units: ok/failed
79 + calc: $failed
80 + units: state
81 every: 10s
83 - warn: $this != nan AND $this == 5
82 + warn: $this != nan AND $this == 1
83 delay: down 5m multiplier 1.5 max 1h
85 - info: one or more the systemd mount units are in the failed state
84 + info: systemd mount units in the failed state
85 to: sysadmin
86
87 ## Automount units
89 - template: systemd_automount_units_state
88 + template: systemd_automount_unit_failed_state
89 on: systemd.automount_unit_state
90 class: Errors
91 type: Linux
92 component: Systemd units
94 - lookup: max -1s min2max
95 - units: ok/failed
93 + calc: $failed
94 + units: state
95 every: 10s
97 - warn: $this != nan AND $this == 5
96 + warn: $this != nan AND $this == 1
97 delay: down 5m multiplier 1.5 max 1h
99 - info: one or more systemd automount units are in the failed state
98 + info: systemd automount unit in the failed state
99 to: sysadmin
100
101 ## Swap units
103 - template: systemd_swap_units_state
102 + template: systemd_swap_unit_failed_state
103 on: systemd.swap_unit_state
104 class: Errors
105 type: Linux
106 component: Systemd units
108 - lookup: max -1s min2max
109 - units: ok/failed
107 + calc: $failed
108 + units: state
109 every: 10s
111 - warn: $this != nan AND $this == 5
110 + warn: $this != nan AND $this == 1
111 delay: down 5m multiplier 1.5 max 1h
113 - info: one or more systemd swap units are in the failed state
112 + info: systemd swap units in the failed state
113 to: sysadmin
114
115 ## Scope units
117 - template: systemd_scope_units_state
116 + template: systemd_scope_unit_failed_state
117 on: systemd.scope_unit_state
118 class: Errors
119 type: Linux
120 component: Systemd units
122 - lookup: max -1s min2max
123 - units: ok/failed
121 + calc: $failed
122 + units: state
123 every: 10s
125 - warn: $this != nan AND $this == 5
124 + warn: $this != nan AND $this == 1
125 delay: down 5m multiplier 1.5 max 1h
127 - info: one or more systemd scope units are in the failed state
126 + info: systemd scope units in the failed state
127 to: sysadmin
128
129 ## Slice units
131 - template: systemd_slice_units_state
130 + template: systemd_slice_unit_failed_state
131 on: systemd.slice_unit_state
132 class: Errors
133 type: Linux
134 component: Systemd units
136 - lookup: max -1s min2max
137 - units: ok/failed
135 + calc: $failed
136 + units: state
137 every: 10s
139 - warn: $this != nan AND $this == 5
138 + warn: $this != nan AND $this == 1
139 delay: down 5m multiplier 1.5 max 1h
141 - info: one or more systemd slice units are in the failed state
140 + info: systemd slice units in the failed state
141 to: sysadmin