How gdonaj/gmonitor works
Gmonitor is a lightweight, push-based host-status dashboard. Hosts submit reports; the server optionally checks a shared key and persists host data. Users authenticate with view-only or admin passwords; the dashboard evaluates staleness and removal timeouts before rendering host cards. Admins can configure display, timeout, and access settings or clean up stale entries. The excerpts show the persistence and route logic in one Flask module; report handling is partly unsampled, so its links follow the README and only clearly supported behavior is shown.
Main entry points: Gmonitor.py Dashboard handler · Gmonitor.ini Runtime configuration · login.html Login page · setting.html Settings form
Components 15
Host reporting
- Report endpoint
src/Gmonitor.py - Shared-key check
src/Gmonitor.py
Access and settings
- Password login
src/Gmonitor.py - Login page
src/templates/login.html - Settings page
src/Gmonitor.py - Settings form
src/templates/setting.html
Dashboard
- Dashboard handler
src/Gmonitor.py - Timeout evaluation
src/Gmonitor.py - Host card grid
src/templates/dashboard.html - Stale cleanup
src/Gmonitor.py
Persisted state
- Settings JSON store
src/Gmonitor.py - Inventory JSON store
src/Gmonitor.py - Runtime configuration
src/Gmonitor.ini
Other components
- Reporting hosts
- Dashboard users
Connections 20
- Reporting hosts → Report endpoint: POST reports
- Report endpoint → Settings JSON store: loads settings
- Report endpoint → Shared-key check: checks key
- Report endpoint → Inventory JSON store: stores reports
- Dashboard users → Password login: submits password
- Password login → Settings JSON store: loads passwords
- Password login → Login page: renders login
- Dashboard users → Dashboard handler: requests dashboard
- Dashboard handler → Settings JSON store: loads settings
- Dashboard handler → Inventory JSON store: loads inventory
- Dashboard handler → Timeout evaluation: evaluates timeouts
- Timeout evaluation → Inventory JSON store: saves removals
- Dashboard handler → Host card grid: renders cards
- Dashboard users → Settings page: admin request
- Settings page → Settings JSON store: loads and saves
- Settings page → Settings form: renders form
- Dashboard users → Stale cleanup: admin cleanup
- Stale cleanup → Inventory JSON store: removes stale entries
- Runtime configuration → Report endpoint: configures files
- Runtime configuration → Dashboard handler: configures files