A comprehensive, Docker-based monitoring solution for NTP and GPS status, using Grafana, Prometheus, and a custom Rust-based GPS exporter.
- Real-time GPS Monitoring: Track satellite fixes, signal strength, and precision metrics via
gpsd. - NTP Performance Tracking: Monitor Chrony offset, delay, and synchronization status.
- Network Health: Includes Smokeping-style latency tracking and Blackbox ICMP/HTTP probing.
- Pre-configured Dashboards: Comes with ready-to-use Grafana dashboards for immediate visualization.
- Prometheus: Time-series database for metrics storage.
- Grafana: Visualization platform with pre-provisioned data sources and dashboards.
- gps_exporter (Rust): Custom exporter that interfaces with
gpsd. - Chrony Exporter: Collects metrics from the Chrony NTP daemon.
- Smokeping Prober: Monitors network latency and packet loss.
- Blackbox Exporter: Performs endpoint probing.
- Docker and Docker Compose
- A running
gpsdinstance (if monitoring local GPS hardware) - A running
chronyinstance (exposed on port323for the exporter)
-
Clone the repository:
git clone https://github.com/scarjit/time-monitor.git cd time-monitor -
Start the stack:
docker-compose up -d
-
Access the Dashboards:
- Open your browser at
http://localhost:3000 - Login with:
- Username:
admin - Password:
admin
- Username:
- Open your browser at
The project automatically provisions the following dashboards in Grafana:
- GPS Dashboard: Satellite status, coordinates, and precision.
- Chrony Dashboard: NTP synchronization metrics.
- Network Monitoring: Latency and connectivity status.
Most settings can be adjusted in the docker-compose.yaml file.
You can change the default Grafana admin credentials by modifying the following environment variables in docker-compose.yaml:
grafana:
environment:
- GF_SECURITY_ADMIN_USER=admin
- GF_SECURITY_ADMIN_PASSWORD=adminThe gps_exporter configuration can also be customized:
gps_exporter:
environment:
- GPSD_HOST=127.0.0.1
- GPSD_PORT=2947
- EXPORTER_PORT=9015By default, the chrony_exporter connects to 127.0.0.1:323. Ensure your chrony daemon is configured to allow connections from the exporter (usually via the bindcmdaddress and cmdallow directives in chrony.conf).
Licensed under either of:
- Apache License, Version 2.0 (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)
at your option.