health: add system clock synchronization state alarm (#11177)
* health: add system clock synchronization state alarm
Ilya Mashchenko committed
May 24, 2021 at 14:43 UTC
0208e34e5a4e7a3e3e80ccf2f70efcaba0fcaac1
2 files changed
+18
health/Makefile.am
+1
@@ -81,6 +81,7 @@ dist_healthconfig_DATA = \
81
health.d/synchronization.conf \
82
health.d/swap.conf \
83
health.d/systemdunits.conf \
84
+ health.d/timex.conf \
85
health.d/tcp_conn.conf \
86
health.d/tcp_listen.conf \
87
health.d/tcp_mem.conf \
health/health.d/timex.conf
new
+17
@@ -0,0 +1,17 @@
1
+
2
+# It can take several minutes before ntpd selects a server to synchronize with;
3
+# try checking after 17 minutes (1024 seconds).
4
+
5
+ alarm: system_clock_sync_state
6
+ on: system.clock_sync_state
7
+ os: linux
8
+ class: System
9
+component: Clock
10
+ type: Error
11
+ calc: $state
12
+ units: synchronization state
13
+ every: 10s
14
+ warn: $system.uptime.uptime > 17 * 60 AND $this == 0
15
+ delay: down 5m
16
+ info: the system time is not synchronized to a reliable server
17
+ to: silent