Accurate time synchronisation is crucial for server operations, affecting everything from log correlation to certificate validation. Server Scout's NTP synchronisation monitoring helps you ensure your servers maintain precise time across your infrastructure.
Why Time Synchronisation Matters
Proper time synchronisation is essential for several critical server functions:
- Log correlation: Accurately timestamped logs across multiple servers enable effective troubleshooting and security analysis
- Certificate validation: SSL/TLS certificates rely on accurate system time for validity checks
- Distributed systems: Microservices, databases, and clustering solutions require synchronised clocks
- Cron job accuracy: Scheduled tasks depend on correct system time for proper execution
- Authentication protocols: Kerberos and other time-sensitive authentication mechanisms
Enabling NTP Sync Monitoring
To monitor NTP synchronisation status in Server Scout, enable the ntp_sync metric in your agent configuration:
- Edit your Server Scout agent configuration file (typically
/opt/scout-agent/agent.conf)
- Add or uncomment the NTP sync metric:
`` metrics=cpu,memory,disk,network,ntp_sync ``
- Restart the Server Scout agent:
``bash sudo systemctl restart scout-agent ``
The agent will begin reporting synchronisation status within the next monitoring cycle.
How Server Scout Checks Sync Status
Server Scout's agent intelligently detects your system's time synchronisation method and uses the appropriate command:
Modern Systems (systemd-timesyncd)
On systems using systemd-timesyncd, the agent executes:
timedatectl status
The agent parses the output to determine if "NTP synchronized" shows "yes" and checks the "System clock synchronized" status.
Chrony-based Systems
For servers running chronyd, the agent uses:
chronyc tracking
This command provides detailed synchronisation information, including reference time, system time accuracy, and sync status.
The agent automatically detects which time service is active and uses the appropriate checking method, ensuring compatibility across different Linux distributions and configurations.
Viewing Sync Status
Once enabled, NTP synchronisation status appears prominently on your server's detail page in the Server Scout dashboard. The display shows:
- Sync status: Clear indication of whether time synchronisation is working
- Time source: The NTP server or time source currently in use
- Last sync: When synchronisation last occurred
- Offset: Current time offset from the reference source
A green indicator shows successful synchronisation, whilst red alerts you to synchronisation failures requiring attention.
Troubleshooting Common NTP Issues
Firewall Blocking UDP Port 123
NTP communication occurs over UDP port 123. If synchronisation fails, check firewall rules:
# Check if port 123 is blocked
sudo iptables -L | grep 123
# Allow NTP traffic (iptables)
sudo iptables -A OUTPUT -p udp --dport 123 -j ACCEPT
# For firewalld systems
sudo firewall-cmd --add-service=ntp --permanent
sudo firewall-cmd --reload
Misconfigured Time Servers
Verify your NTP server configuration:
For systemd-timesyncd, check /etc/systemd/timesyncd.conf:
sudo nano /etc/systemd/timesyncd.conf
Ensure reliable NTP servers are configured:
[Time]
NTP=0.pool.ntp.org 1.pool.ntp.org
For chrony, examine /etc/chrony/chrony.conf:
sudo nano /etc/chrony/chrony.conf
Choosing Between Chrony and systemd-timesyncd
systemd-timesyncd is suitable for most standard servers with stable network connections. It's lightweight and integrated with systemd.
Chrony offers superior performance for:
- Servers with intermittent network connectivity
- Systems requiring high precision time synchronisation
- Environments with strict timing requirements
To switch from systemd-timesyncd to chrony:
sudo systemctl disable systemd-timesyncd
sudo apt install chrony
sudo systemctl enable chronyd
sudo systemctl start chronyd
Regular monitoring of NTP synchronisation through Server Scout ensures your infrastructure maintains accurate time, preventing the cascading issues that clock drift can cause across your server environment.
Frequently Asked Questions
How do I enable NTP synchronisation monitoring in ServerScout?
How does ServerScout check NTP synchronisation status?
What NTP synchronisation information does ServerScout display?
Why is NTP synchronisation important for servers?
How do I fix NTP synchronisation when firewall is blocking it?
Should I use chrony or systemd-timesyncd for NTP synchronisation?
How do I configure NTP servers for time synchronisation?
Was this article helpful?