No description
- Python 66%
- HTML 26.3%
- CSS 5.9%
- Shell 1%
- Dockerfile 0.8%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
Closes #6 Monitoring plan, phase 5 rollout, same as the pilots argus/backend#45 and argus/frontend#35. ## Changes (`.forgejo/workflows/ci.yml`) - New step "Collect publish details for Argus": `ARGUS_ARTIFACT` = `<image:tag>|<compressed bytes>|<package page>`, the size being the sum of the layers of the linux/amd64 manifest (`docker buildx imagetools inspect --raw` + jq); `/tmp/dependencies.txt` = `pip freeze` inside the pushed image (empty on failure). - Both publish-release calls (numbered release, devel snapshot) get `ARGUS_UPLOAD_TOKEN: ${{ secrets.ARGUS_UPLOAD_TOKEN }}` and `--artifact "$ARGUS_ARTIFACT" --dependencies /tmp/dependencies.txt`. A failed upload only warns, the release itself is unaffected. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_014BSmBtGWeFBD9z4mYm9SjA Reviewed-on: #7 |
||
| .forgejo/workflows | ||
| config | ||
| deploy | ||
| docs | ||
| instances | ||
| .env.example | ||
| .gitignore | ||
| .pylintrc | ||
| docker-entrypoint.sh | ||
| Dockerfile | ||
| LICENSE | ||
| manage.py | ||
| pyproject.toml | ||
| README.md | ||
| renovate.json | ||
| requirements-dev.txt | ||
| requirements.txt | ||
| tox.ini | ||
vieuxhibou
Central server for the small vieuxhibou structured-logging ecosystem:
receives the registration and heartbeat of every service instance
(vieuxhibou-django,
vieuxhibou-gin), and
offers a single dashboard to view and hot-change the level of any of
their loggers — without restarting any service.
This repo is the server. The two repos above are the client libraries that register with it from each project.
How it works
- Each service instance (a
drhcontainer,poulpinou-worker, etc.) registers here on startup (POST /api/instances/register), then sends a periodic heartbeat (POST /api/instances/<id>/heartbeat) with the current state of all its Python/slogloggers. - The dashboard (
GET /) lists these instances, grouped by service, with their loggers and a form to change the level of any of them. An instance with no recent heartbeat (VIEUXHIBOU_STALE_AFTER_SECONDS, 90s by default) is shown greyed out rather than silently going stale. - Changing a level from the dashboard (
POST /instances/<pk>/loggers/<name>/set-level/) doesn't write anything here: it calls back into the instance's ownPATCH /vieuxhibou/loggers/<name>/API (itsself_url, supplied at registration) — the source of truth always stays the process itself, this server is only a cache of what it last reported.
Authentication
Two separate mechanisms, no user accounts anywhere in this app:
- The dashboard (human, browser): no application-level check.
Access is entirely delegated to Traefik's shared
authentik@filemiddleware (same mechanism as Grafana/mailpit/RabbitMQ on this server) — seeconfig/settings/base.py. - The register/heartbeat/set-level API (machine to machine): a
single shared token (
VIEUXHIBOU_SHARED_TOKEN), the same value configured here and on every client — deliberately simple for v1, a per-service token could follow if the need arises.
Local development
python3 -m venv .venv && source .venv/bin/activate
pip install -r requirements-dev.txt
python manage.py migrate
python manage.py runserver
pip install tox
tox # tous les environnements (py315, lint, format-check, bandit)
tox -e py315 # tests unitaires (pytest) + couverture seule
tox -e lint # pylint (+ pylint-django)
tox -e format # autopep8 --in-place
tox -e bandit # analyse de sécurité statique
Deployment
See deploy/README.md.
License
GPLv3, see LICENSE -- an application, not a library meant to be imported elsewhere (unlike vieuxhibou-django/-gin, which are LGPLv3), so no reason to avoid the GPL here.