No description
  • Python 36.4%
  • TypeScript 27.8%
  • Vue 26.8%
  • Shell 6.2%
  • CSS 2.2%
  • Other 0.6%
Find a file
2026-03-08 20:07:54 +00:00
backend Add timezone-aware display preferences and live chart fixes 2026-03-08 20:55:18 +01:00
client Filter ephemeral docker disk mounts 2026-03-07 18:53:13 +01:00
client-test feat: harden app security and add smoke test audit 2026-03-07 13:19:50 +01:00
frontend Add timezone-aware display preferences and live chart fixes 2026-03-08 20:55:18 +01:00
scripts Add timezone-aware display preferences and live chart fixes 2026-03-08 20:55:18 +01:00
secrets feat: harden app security and add smoke test audit 2026-03-07 13:19:50 +01:00
.env.sample feat: harden app security and add smoke test audit 2026-03-07 13:19:50 +01:00
.gitignore chore: ignore generated audit reports 2026-03-07 13:22:52 +01:00
AGENTS.md Handle chart gaps and normalize UTC timeline 2026-03-07 16:46:16 +01:00
CHANGELOG.md Release 0.1.5 2026-01-18 22:57:13 +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.local.yaml feat(client): add upgrade fallback for local_disks payload 2026-03-02 17:26:55 +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 feat: harden app security and add smoke test audit 2026-03-07 13:19:50 +01: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

Smoke test

An isolated Docker smoke test is available in scripts/run_smoke_test.sh.

Run it from the repo root:

./scripts/run_smoke_test.sh

It generates SECURITY_SMOKE_TEST_REPORT_AAAAMMJJ_HHMMSS.md automatically.

Usage details and options are documented in scripts/README.md.

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.