Skip to main content
Released

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

Related products:Infra Monitoring - Connectors
  • November 21, 2023
  • 6 replies
  • 168 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
  • December 1, 2023
NewNeeds Votes

Forum|alt.badge.img+5
  • Centreonian
  • June 12, 2024
Needs VotesIn Backlog

Forum|alt.badge.img+5
  • Centreonian
  • September 5, 2025
In BacklogPlanned

Forum|alt.badge.img+5
  • Centreonian
  • September 19, 2025
PlannedReleased

ltirand
Centreonian
Forum|alt.badge.img+12
  • Centreonian
  • September 19, 2025

Hello :)

This idea is released with the September 2025 release.

Kind regards


Aleksey
Forum|alt.badge.img+6
  • Author
  • Steward **
  • July 14, 2026

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