No description
Find a file
2026-01-22 16:54:19 +01:00
backend Improve metrics sampling and client UI 2026-01-18 22:51:19 +01:00
client add ressource consumption for bonpapa-client.service 2026-01-22 16:54:19 +01:00
client-test Consolidate client-test README 2026-01-18 21:03:47 +01:00
frontend Improve metrics sampling and client UI 2026-01-18 22:51:19 +01:00
secrets Finalize UI, alerts, and config updates 2025-12-31 19:29:25 +01:00
.env.sample Update sample env defaults 2026-01-18 23:00:30 +01:00
.gitignore Ignore .env and .toml files 2026-01-18 20:57:52 +01:00
CHANGELOG.md Release 0.1.5 2026-01-18 22:57:13 +01:00
client_key.txt Update compose env defaults 2026-01-03 14:14:17 +01:00
docker-compose-dev.yaml Add preferences API, dev docker fixes, and i18n accents 2025-12-31 15:18:17 +01:00
docker-compose.yml Use env-based container names and fixed images 2026-01-18 22:54:24 +01:00
LICENSE Add license, citation, footer, and reduce theme flash 2026-01-04 16:30:22 +01:00
README.md Actualiser README.md 2026-01-22 14:31:52 +00:00
specs.md Actualiser specs.md 2025-12-30 23:56:28 +00:00

BonPapa — Light & Easy Monitoring

BonPapa — Light & Easy Monitoring

Quickstart

Pull the repo:

git clone https://forgejo.high.statisfaction.rocks/statisfaction_public/bonpapa.git
cd bonpapa

Installing a client agent in the host to monitor

Client installation (agent on monitored host):

cp ./client/config.toml.example ./client/config.toml

Edit the ./client/config.toml with credentials from the server and an alias for the server to monitor

chmod +x ./client/install.sh
sudo ./client/install.sh

Installing server via Docker Compose

This repo runs the frontend/backend from prebuilt images. Build/push images first, or set BACKEND_IMAGE and FRONTEND_IMAGE in .env (after cp .env.sample .env), then:

docker compose up -d

License

BonPapa is released under the MIT License. See LICENSE.

Citation / Attribution

If you use BonPapas source code in research, documentation, or derived projects, please cite:

Robin Cohen-Selmon. BonPapa. (2026). Source code available at: https://forgejo.high.statisfaction.rocks/statisfaction_public/BonPapa

Please retain this notice in any substantial redistribution of the source.

Exports

CSV metric exports include a client_id column for easy correlation.

API Notes

  • GET /clients lists visible clients. Use ?all_clients=true for admins.
  • GET /clients/{client_id} returns client details.
  • GET /clients/{client_id}/export returns CSV metrics for a client.

Frontend configuration

The frontend supports these optional Vite env vars:

  • VITE_SESSION_HINT_TTL_SECONDS (default: 300) — how long the login page keeps the session-expired hint.
  • VITE_SESSION_HINT_AUTO_HIDE_SECONDS (default: 6) — auto-dismiss delay for the hint. Set to 0 to disable.

CSV schema:

client_id,timestamp,cpu,memory,disk,load1,load5,load15,net_rx,net_tx

Risk Scoring

Clients are ranked using EWMA-smoothed metrics (exponential smoothing) to emphasize recent behavior, combined with a sigmoid scale around the threshold and a deviation term based on recent variance.

Metrics used:

  • cpu, memory, disk
  • load1, load5, load15
  • net_rx, net_tx

Default risk alert threshold: 80% (aligned with common 80% CPU utilization alarm thresholds).

Algorithm details

  1. EWMA smoothing (recent emphasis)
    Each metric is smoothed with an EWMA over ~10 samples to reduce noise while staying responsive.

  2. Threshold ratio (normalization)
    ratio = EWMA / threshold so each metric is evaluated relative to its configured limit.

  3. Sigmoid ramp near threshold
    A sigmoid centered at ratio = 1.0 makes risk increase smoothly around the threshold and avoid linear spikes.

  4. Deviation term (zscore)
    We add a smaller contribution based on how many standard deviations the latest value is from the recent mean.

  5. Weighted aggregation
    Metrics are combined with weights:

  • cpu/memory/disk: 0.2 each

  • load1/load5/load15: 0.1 each

  • net_rx/net_tx: 0.05 each

  1. Network log scaling
    net_rx/net_tx are log1pscaled before thresholding to reduce heavytail bursts.