From 0208e34e5a4e7a3e3e80ccf2f70efcaba0fcaac1 Mon Sep 17 00:00:00 2001 From: Ilya Mashchenko Date: Mon, 24 May 2021 14:43:15 +0300 Subject: health: add system clock synchronization state alarm (#11177) * health: add system clock synchronization state alarm --- health/Makefile.am | 1 + health/health.d/timex.conf | 17 +++++++++++++++++ 2 files changed, 18 insertions(+) create mode 100644 health/health.d/timex.conf diff --git a/health/Makefile.am b/health/Makefile.am index 7b25c07cdd..f5ec7dcaec 100644 --- a/health/Makefile.am +++ b/health/Makefile.am @@ -81,6 +81,7 @@ dist_healthconfig_DATA = \ health.d/synchronization.conf \ health.d/swap.conf \ health.d/systemdunits.conf \ + health.d/timex.conf \ health.d/tcp_conn.conf \ health.d/tcp_listen.conf \ health.d/tcp_mem.conf \ diff --git a/health/health.d/timex.conf b/health/health.d/timex.conf new file mode 100644 index 0000000000..32a9a3afbf --- /dev/null +++ b/health/health.d/timex.conf @@ -0,0 +1,17 @@ + +# It can take several minutes before ntpd selects a server to synchronize with; +# try checking after 17 minutes (1024 seconds). + + alarm: system_clock_sync_state + on: system.clock_sync_state + os: linux + class: System +component: Clock + type: Error + calc: $state + units: synchronization state + every: 10s + warn: $system.uptime.uptime > 17 * 60 AND $this == 0 + delay: down 5m + info: the system time is not synchronized to a reliable server + to: silent -- cgit v1.2.3