feat(monitoring): Studio's alert webhook goes to the bot service (#10) #21
No reviewers
Labels
No labels
ready-for-agent
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
bryan/nix-configs!21
Loading…
Reference in a new issue
No description provided.
Delete branch "n10-2-alert-webhook-pi-bots"
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?
Part of #10 (N10.2: the alert webhook pointed at the bot service).
What
Studio's
services.monitoring.alertWebhooknow posts every Alertmanager notification to the bot service's (pi-bots)studio-alertsroute instead of Hermes's:url:http://127.0.0.1:8645/webhooks/studio-alerts(was Hermes on 8644)tokenHeader:X-Pi-Bots-Token(wasX-Gitlab-Token)tokenFile:~/.secrets/pi-bots/webhooks/studio-alerts.token(made bypi-bots webhook token studio-alerts)Steve posts each notification into the encrypted Studio Alerts room with no model turn. The payload is Alertmanager's own JSON, unchanged; the route (
group_by,send_resolved) is unchanged. Email delivery is untouched.Docs:
modules/services/AGENTS.md(the webhook section and the monitoring row),monitoring.nixcomments and option examples, README.Tests
scripts/test_monitoring_alert_webhook.py(13): Studio's receiver names the new URL, header and token file; nothing of Hermes's route is left in the generated config; the activation preflight names the new token file; the real Alertmanager sends the token inX-Pi-Bots-Tokenwithout its newline and a version 4 body. With the old host file, 4 tests fail.test_dashy_status_api.pyandtest_pi_bots_service.pypass.darwin-rebuild build --flake .#studiobuilds.After
update-systemAlertmanager restarts with the new config. A test alert posted to Alertmanager arrives in Studio Alerts from Steve, and
pi_bots_webhook_requests_total{webhook="studio-alerts",result="posted"}rises.Review
A visible Pi reviewer approved with one should-fix (
fseventsd-watchdog.nix's header still named Hermes as the alert path) and three nits (thepi-botsrow's Ports column;group_byunpinned; a redundant test). The should-fix and the first two nits were fixed, with thegroup_bymutation now failing a test; approved on correction 1. Left: the activation preflight's condition is untested (pre-existing; it only warns).