Skip to content

NTP

Auto-Detection
Health Check
Exporter Metrics

Bleemeo monitors NTP through automatic service detection with protocol health checks, and optionally through a third-party Prometheus exporter for detailed clock synchronization metrics.

Glouton automatically detects NTP instances running on the system.

If auto-detected parameters are incorrect, you can override them manually.

Terminal window
sudo tee /etc/glouton/conf.d/99-ntp.conf > /dev/null << 'EOF'
service:
- type: "ntp"
address: "127.0.0.1"
port: 123
EOF

Glouton automatically detects configuration changes.

Glouton performs an NTP protocol check when the service listens on port 123.

Metric Description
service_status Status of NTP

For detailed clock synchronization metrics such as offset and stratum, you can deploy the sapcc/ntp_exporter.

  • An NTP server reachable from the host (local or remote)
  • Glouton agent installed on the same host
  • Go toolchain (if building from source) or access to GitHub releases

No special configuration is needed on the NTP server side.

Download the latest release from the ntp_exporter releases page, or install with Go:

Terminal window
go install github.com/sapcc/ntp_exporter@latest

Start the exporter, pointing it at an NTP server:

Terminal window
ntp_exporter --ntp.server=127.0.0.1

The exporter listens on port 9559 by default. Verify it is working:

Terminal window
curl http://localhost:9559/metrics

For production use, create a systemd service unit to manage the exporter process.

Terminal window
sudo tee /etc/glouton/conf.d/99-ntp.conf > /dev/null << 'EOF'
metric:
prometheus:
targets:
- url: "http://localhost:9559/metrics"
name: "ntp"
allow_metrics:
- "ntp_stratum"
- "ntp_offset_seconds"
- "ntp_rtt_seconds"
- "ntp_reference_timestamp_seconds"
- "ntp_leap"
- "ntp_scrape_valid"
EOF

Glouton automatically detects configuration changes.

Metric Description
ntp_stratum NTP stratum level of the server
ntp_offset_seconds Clock offset from the NTP server in seconds
ntp_rtt_seconds Round-trip time to the NTP server in seconds
ntp_reference_timestamp_seconds Timestamp of the last NTP update
ntp_leap Leap indicator (0 = none, 1 = add second, 2 = delete second, 3 = alarm)
ntp_scrape_valid Whether the last scrape of the NTP server was successful (1 = valid)