Service Dashboard — monitor app

Service Dashboard — monitor app

Service Dashboard is a monitor app built from LightGUI's new XFrame monitor widgets: one 1024x768 window holding a single XMonitorGrid of illuminator buttons for the services that actually run on the host. Each button polls its live check every 2 seconds and glows green when up, red when down, dim when unknown. Click a button to toggle its detail line (pid / unit state / open-closed).

Service Dashboard running under Xvfb, 12 of 12 services up
Service Dashboard running under Xvfb — 12/12 services up on hot_dallas.

What it monitors

Twelve real services on hot_dallas — no mock or seeded demo data. Every cell is a live XMonitorButton check:

ButtonKindWhat the check does
SSH :22PortTCP connect to localhost:22 (sshd)
HTTP :80PortTCP connect to localhost:80 (nginx)
HTTPS :443PortTCP connect to localhost:443 (nginx)
NPM admin :81PortTCP connect to localhost:81 (Nginx Proxy Manager)
ThinkMelt :2368PortTCP connect to localhost:2368 (ThinkMelt Ghost)
Ghost :5000PortTCP connect to localhost:5000 (Ghost blog)
lightgui.com :5009PortTCP connect to localhost:5009 (this site's Ghost)
Traffic stats :7888PortTCP connect to localhost:7888 (GoAccess)
dockerdProcessScans /proc for a process whose comm is dockerd
containerdProcessScans /proc for a process whose comm is containerd
docker.serviceUnitsystemctl is-active docker.service == active
ssh.serviceUnitsystemctl is-active ssh.service == active

Widgets used

  • XMonitorGrid — the panel; one shared poll_all() timer, N/12 up summary in its title bar.
  • XMonitorButton — one cell per service (kinds Port / Process / Unit, via set_kind / set_target / poll()).

Every visible UI element is a widget from the LightGUI registry — no raw X11 drawing, no native GTK calls, no hand-rolled controls. The app shell (window, event loop, 500 ms select() timeout driving the 2 s poll tick) is the harness, not a UI element.

Build and run

The app exists in all three LightGUI languages, on branch monitor-apps/service-dashboard in each repo. Same window, same twelve services, same 2 s timer in each.

# C++ (lightgui)
cd examples/monitor/service-dashboard
make
DISPLAY=:119 ./service-dashboard
# Rust (lightgui_rust)
cargo run -p xframe-demo --example monitor_service_dashboard
# Python (lightgui_python)
PYTHONPATH=. python3 examples/monitor_service_dashboard/main.py

Close the window (Rust also accepts Esc / q) to quit. Python tests stay green: DISPLAY=:99 python3 -m unittest discover -s tests — 363 tests passed.

Source

  • C++: lightgui — examples/monitor/service-dashboard/main.cpp (+ Makefile, README, screenshot)
  • Rust: lightgui_rust — crates/xframe-demo/examples/monitor_service_dashboard/main.rs
  • Python: lightgui_python — examples/monitor_service_dashboard/main.py

Part of the Monitor Widgets set — the btop-style live widgets for LightGUI.

Linux Rocks Every Day
Source code: LightGUI (C) · LightGUI (Rust) · LightGUI (Python)