Files
Muse 1c33577bb9 monitor-apps/service-dashboard: Service Dashboard app (XMonitorGrid, 12 live dallas services)
One 1024x768 window: XMonitorGrid of XMonitorButton cells for the
real services on hot_dallas -- ports 22/80/443/81/2368/5000/5009/7888,
processes dockerd/containerd, units docker.service/ssh.service.
Live poll_all() on a 2 s GLib timer; green up / red down.
Screenshot verified: 12/12 up. Tests: 363 passed.
2026-12-05 19:55:15 +00:00

2.0 KiB
Raw Permalink Blame History

Service Dashboard — monitor app (Python)

A service/port dashboard in one window (1024×768): a single XMonitorGrid of illuminator buttons for the services that actually run on this host (hot_dallas). Each button polls its live check every 2 seconds and glows green when up, red when down, dim when unknown. Click anywhere on the grid to re-poll every cell now.

What it monitors

Button Kind Check
SSH :22 Port TCP connect to localhost:22
HTTP :80 Port TCP connect to localhost:80 (nginx)
HTTPS :443 Port TCP connect to localhost:443 (nginx)
NPM admin :81 Port TCP connect to localhost:81
ThinkMelt :2368 Port TCP connect to localhost:2368
Ghost :5000 Port TCP connect to localhost:5000
lightgui.com :5009 Port TCP connect to localhost:5009
Traffic stats :7888 Port TCP connect to localhost:7888 (GoAccess)
dockerd Process /proc/<pid>/comm == dockerd
containerd Process /proc/<pid>/comm == containerd
docker.service Unit systemctl is-active docker.service == active
ssh.service Unit systemctl is-active ssh.service == active

No mock or static data: every cell is a live XMonitorButton check (poll_all() on a 2 s GLib.timeout_add timer).

Widgets used

  • XMonitorGrid — the panel; one shared poll_all() timer.
  • XMonitorButton — one cell per service (kinds port / process / unit, via set_monitors).

Build and run

# from the lightgui_python checkout
PYTHONPATH=/root/monitor-wt/service-dashboard/lightgui_python python3 examples/monitor_service_dashboard/main.py

Tests

DISPLAY=:99 python3 -m unittest discover -s tests

Source

  • Python: examples/monitor_service_dashboard/main.py in lightgui_python
  • C++: examples/monitor/service-dashboard/main.cpp in lightgui
  • Rust: crates/xframe-demo/examples/monitor_service_dashboard/main.rs in lightgui_rust