Documentation
How it works
- Runs
chronyc clientsviasudoto collect live NTP client data. - Classifies by address: hostname, IPv4, IPv6; sorts hostnames alphabetically, IPv4 numerically by octet, IPv6 lexicographically.
- Maps columns into keys (
addr,NTP,Drop,Cmd,Int,IntL,Last). - Exposes
/data(JSON) and/(dashboard UI). Frontend polls once per second.
Install path & structure
/opt/ticc-dash
βββ ticc-dash.py
βββ venv/
βββ static/
βββ img/
βββ ticc-dash-logo.png
systemd unit: /etc/systemd/system/ticc-dash.service
sudoers: /etc/sudoers.d/ticc-dash
TICC-DASH backend (ticc-dash.py)
ticc-dash.py is a small Flask app with two jobs:
(1) collect live client data from chronyc clients and
(2) serve that data as JSON to the dashboard. It drops header lines, classifies/sorts addresses,
and returns a compact payload with a total count and server time. On failures an
error field is included.
Endpoints
/ β Renders the dashboard UI (HTML/JS) from a Flask string template.
/data β JSON with parsed client rows plus meta (count, local_time, optional error).
Security & permissions
- Requires a sudoers rule to run
/usr/bin/chronyc clientswithout a password. - Arguments are passed as a fixed list to
subprocess(no shell expansion). - Errors (missing binary, permission denied, etc.) are surfaced via the
errorfield.
Performance tips
- Frontend polls every second (
setInterval(refresh, 1000)); increase to 2β5s for large fleets. - Run behind a production WSGI server (e.g., gunicorn) and a reverse proxy (e.g., Nginx).
- For better security, add an access list (HTTP auth or IP allow-list) at the proxy.
Typical use cases
- Monitoring NTP client drift and reachability.
- Quickly spotting clients with dropped packets.
- Finding IPv4/IPv6 configuration issues.
- Running behind Nginx with HTTPS in production.
Manage the systemd service
Start
Start the TICC-DASH service if it is not running.
sudo systemctl start ticc-dash.service
Stop
Gracefully stop the TICC-DASH service.
sudo systemctl stop ticc-dash.service
Restart
Reload the service by stopping and starting it (useful after updates).
sudo systemctl restart ticc-dash.service
Status
Show current status, last logs and whether itβs enabled on boot.
sudo systemctl status ticc-dash.service
Enable on boot
Start the service automatically after a reboot.
sudo systemctl enable ticc-dash.service
Disable on boot
Prevent the service from starting automatically on reboot.
sudo systemctl disable ticc-dash.service
Follow logs
Stream live logs for troubleshooting.
sudo journalctl -u ticc-dash.service -f
Recent logs (1h)
Show logs from the last hour only.
sudo journalctl -u ticc-dash.service --since "1 hour ago"
Troubleshooting
- No clients visible? Run
sudo chronyc clientsmanually to verify. - Service wonβt start? Inspect logs with
sudo journalctl -u ticc-dash.service -f. - Port 5000 already in use? Free the port or put a reverse proxy (Nginx) in front.
- Logo missing? Ensure
ticc-dash-logo.pngexists under/opt/ticc-dash/static/img/.