NTP
Bleemeo monitors NTP through automatic service detection with protocol health checks, and optionally through a third-party Prometheus exporter for detailed clock synchronization metrics.
Auto-Detection
Section titled “Auto-Detection”Glouton automatically detects NTP instances running on the system.
If auto-detected parameters are incorrect, you can override them manually.
sudo tee /etc/glouton/conf.d/99-ntp.conf > /dev/null << 'EOF'service: - type: "ntp" address: "127.0.0.1" port: 123EOFCreate or edit the file C:\ProgramData\glouton\conf.d\99-ntp.conf:
service: - type: "ntp" address: "127.0.0.1" port: 123Glouton automatically detects configuration changes.
Health Check
Section titled “Health Check”Glouton performs an NTP protocol check when the service listens on port 123.
| Metric | Description |
|---|---|
service_status | Status of NTP |
Exporter Metrics
Section titled “Exporter Metrics”For detailed clock synchronization metrics such as offset and stratum, you can deploy the sapcc/ntp_exporter.
Prerequisites
Section titled “Prerequisites”- 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
Installing the Exporter
Section titled “Installing the Exporter”No special configuration is needed on the NTP server side.
Download the latest release from the ntp_exporter releases page, or install with Go:
go install github.com/sapcc/ntp_exporter@latestStart the exporter, pointing it at an NTP server:
ntp_exporter --ntp.server=127.0.0.1The exporter listens on port 9559 by default. Verify it is working:
curl http://localhost:9559/metricsFor production use, create a systemd service unit to manage the exporter process.
Glouton Configuration
Section titled “Glouton Configuration”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"EOFCreate or edit the file C:\ProgramData\glouton\conf.d\99-ntp.conf:
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"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) |