Skip to main content
Released

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

Related products:Infra Monitoring - Connectors
  • Nov 21, 2023 9:47 AM UTC
  • 6 replies
  • 196 views

Aleksey
Forum|alt.badge.img+6

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.

6 replies

rchauvel
Centreonian
Forum|alt.badge.img+18
  • Centreonian
  • Dec 1, 2023 1:26 PM UTC
New→Needs Votes

Forum|alt.badge.img+5
  • Centreonian
  • Jun 12, 2024 3:59 PM UTC
Needs Votes→In Backlog

Forum|alt.badge.img+5
  • Centreonian
  • Sep 5, 2025 8:47 AM UTC
In Backlog→Planned

Forum|alt.badge.img+5
  • Centreonian
  • Sep 19, 2025 7:29 AM UTC
Planned→Released

ltirand
Centreonian
Forum|alt.badge.img+13
  • Centreonian
  • Sep 19, 2025 7:30 AM UTC

Hello :)

This idea is released with the September 2025 release.

Kind regards


Aleksey
Forum|alt.badge.img+6
  • Author
  • Builder *
  • Jul 14, 2026 9:59 AM UTC

Thanks for the plugin, but there is a problem with it.


The check does not detect a problem if there is not a single peer with reach > 0 among the listed peers.
In fact, when we have peers with reach = 0, it means that synchronization does not work.

In this example, we're testing a system with only one time source. 
The plugin tells us everything is fine:

# ./centreon_plugins.pl --plugin=os::linux::local::plugin --mode=ntp 
--critical-offset '-180000:180000'
--critical-peers '1:'
--exclude-state '.*(not used).*'
--filter-perfdata-adv 'not (%(label) =~ /\.(detected.count)/)'
--filter-uom 'null'
--warning-offset '-60000:60000'
--warning-stratum '0:6'

OK: Number of ntp peers: 1 - Peer 'ntp.sub.holding.com' [type: Primary NTP Server] [reach: 0] [state: configured and available for use] |
'ntp.sub.holding.com#peer.time.offset.milliseconds'=0;;;0;
'ntp.sub.holding.com#peer.stratum.count'=0;0:6;;0;

But in reality, we understand that synchronization with this single time source does not work:

# timedatectl timesync-status

Server: n/a (ntp.sub.holding.com)
Poll interval: 0 (min: 32s; max 34min 8s)
Packet count: 0