# 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//comm` == `dockerd` | | containerd | Process | `/proc//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 ```sh # from the lightgui_python checkout PYTHONPATH=/root/monitor-wt/service-dashboard/lightgui_python python3 examples/monitor_service_dashboard/main.py ``` ## Tests ```sh DISPLAY=:99 python3 -m unittest discover -s tests ``` ## Source - Python: `examples/monitor_service_dashboard/main.py` in [lightgui_python](https://github.com/cnmcdee/lightgui_python) - C++: `examples/monitor/service-dashboard/main.cpp` in [lightgui](https://github.com/cnmcdee/lightgui) - Rust: `crates/xframe-demo/examples/monitor_service_dashboard/main.rs` in [lightgui_rust](https://github.com/cnmcdee/lightgui_rust)