Connectors: pull reports from other tools, starting with Beszel #39
No reviewers
Labels
No labels
breaking
bug
ci
dependencies
documentation
feature
security
skip-changelog
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
argus/backend!39
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/37-connectors"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes #37
Monitoring plan, phases 4.1 and 4.2.
Changes
apps.connectors:Connector: project, kind (beszel), name, internal base URL (bare container names accepted, e.g.http://beszel:8090— Django's URLValidator refuses them), username, secret (EncryptedTextField, write-only in the API, excluded from the admin), interval (≥ 60 s), enabled,last_run_at/last_status/last_error.apps.connectors.tasks.run_due_connectorsevery minute (seeded onpost_migrate), onerun_connectortask per due connector. Any tool error is recorded on the connector, nothing is filed.apps/connectors/beszel.py, PocketBase API with a Beszel user): one report per system,ref_kind=source,ref_value=<system name>,custom_type_name=beszel, metricssystem_status(up ok / down fail / other warn),alerts_triggered(warn if any) and the list of triggered alerts;expect_every= 3 × interval. Detailed stats stay in Beszel (graphs).GET/POST /api/projects/<o>/<r>/connectors/,PATCH/DELETE …/<id>/(empty secret keeps the stored one),POST …/<id>/run/(runs inside the request and returns the outcome andreports_filed).apps.reports.ingest.store_custom_report(): raw file +Report+process_report, now also used by the self-reports (same storage keys as before).deploy/docker-compose.yml:argusandargus-workerjoin the externalmonitoringnetwork. The CI deploy uses the server's own compose file: I'll create the network (vps-garionbeszel/) and update/srv/docker/argus/docker-compose.ymlwhen this is merged, before the deploy.apps/connectors/tests.py.Checks
pytest (232 passed), pylint 10/10, autopep8, bandit clean.
🤖 Generated with Claude Code
https://claude.ai/code/session_014BSmBtGWeFBD9z4mYm9SjA
📊 Rapports Argus pour cette PR