centreon-plugins icon indicating copy to clipboard operation
centreon-plugins copied to clipboard

[os::linux::local::plugin] Adding support for timedatectl to "ntp" mode

Open Aleksey-Maksimov opened this issue 2 years ago • 0 comments

Hello,

Many modern Linux systems that are part of systemd have the systemd-timesyncd service. If this service is used, then there are no such things as ntpd and chronyd in the system.

Please extend the "ntp" mode to work with the timedatectl utility.

# timedatectl status
               Local time: Fri 2022-10-07 18:33:28 MSK
           Universal time: Fri 2022-10-07 15:33:28 UTC
                 RTC time: Fri 2022-10-07 15:33:28
                Time zone: Europe/Moscow (MSK, +0300)
System clock synchronized: yes
              NTP service: active
          RTC in local TZ: no
# timedatectl timesync-status
       Server: 10.10.0.2 (srv-ntp.holding.com)
Poll interval: 34min 8s (min: 32s; max 34min 8s)
         Leap: normal
      Version: 3
      Stratum: 3
    Reference: A05A409
    Precision: 1us (-23)
Root distance: 128.654ms (max: 5s)
       Offset: +6.303ms
        Delay: 1.544ms
       Jitter: 16.867ms
 Packet count: 17
    Frequency: +1.635ppm

Thank you.

Aleksey-Maksimov avatar Oct 07 '22 15:10 Aleksey-Maksimov