[Bug] Drift Detection isn´t sending out alerts via webhook
Describe the bug
Drift Detection isn´t sending out alerts via webhook. I disabled email delivery of alerts and enabled webhook. Since this moment (or maybe since a specific version later than 1.0.0 ) does not deliver an alert when a drift is detected. This was working in the past, bug via email. A test-webhook is working fine.
Steps to Reproduce
- disable email delivery
- enable webhook delivery
- review after trigger
Expected behavior
should be sent also via webhook
Environment
- PegaProx Version: 1.1.1
- Installation Method: Docker
- OS: Debian 13 (Docker Host)
- Browser: Chrome latest
- Behind Reverse Proxy? No
- UI? Corporate
Logs
none
Screenshots
Checklist
- [X] I have searched existing issues to make sure this is not a duplicate
- [X] I am using the latest version of PegaProx
Found it, and it's ours.
When an alert fires we do two separate things: call the notification handlers, and dispatch to the webhook channels you configured. Those aren't the same path — the handler list is really just web-push. Drift only ever did the first one, so a drift event went to push and nowhere else, no matter how many webhooks you had set up. Your Test button kept working the whole time because it dispatches directly, which is why it looked like the webhook side was fine.
Fixed on Testing, every enabled channel gets drift events now. The cross-cluster SDN drift scanner had the same gap and got the same fix, it was written from the same template.
One thing I can't confirm: drift has no email path in the code either, so I'm not sure what was reaching you by mail before. If you still have one of those old mails, the subject line would tell me whether it came from an alert rule rather than from drift itself — would be good to know if there's a second thing broken here.
Ships with the next release. Cheers for the clear report — "test webhook works, real one doesn't" is what narrowed it down fast.
Marcus
(we run on donations if you ever feel like it: https://opencollective.com/pegaprox)
Hi @mkellermann97 thanks for the fix!
May I ask where we can find the configuration in general (using the corporate UI)? From the docs:
No, sorry, I deleted all these old mails, but I definitely got drift detected messages :(
It's per cluster, under Compliance → Drift. Pick the cluster first, then that sub-tab — rescan, reset baseline and acknowledge/promote all live there.
There's no drift-specific notification config, which is worth knowing: drift doesn't have its own channel picker the way a metric alert rule does. That's exactly why the fix sends to every enabled webhook channel rather than a selected subset — there'd be nothing to select from.
On the old mails: I went through the whole backend looking for one, and no email path knows about drift at all — not the alert mailer, not the node-status one, not the update-available one. So whatever you were getting, it didn't come out of the drift feature. My guess is an alert rule you had set up that happened to fire around the same time, but that's a guess. If drift mails ever show up again without you configuring anything, tell me — that'd mean I missed a path.
Cheers — MK
Hi @mkellermann97 there is nothing to configure... can confirm:
about the mails: sure, I´ll search again for it and keep you posted ;)
You're right and I pointed you at the wrong place — sorry. Compliance → Drift is where you rescan, reset the baseline and acknowledge findings; there's no webhook config there, so your screenshot is showing exactly what it should.
The channels live under Settings → Server, in the Alerts card, section "Alert Channels" — Slack, Discord, Teams, ntfy or a plain JSON webhook. They're global, not per cluster: every enabled channel fires, and drift alerts now go through the same dispatch as the rest (that was the bug). There's a Test button per channel, which is the quickest way to confirm the target is reachable before waiting on a real drift event.
No rush on the mail thing, whenever you get to it.
Marcus
1.2.0 is out and the drift path reaches your webhook channels now.
For what it's worth, I ran it end to end here before the release — triggered a drift scan with a channel configured and watched the dispatch actually happen, which it never did before. Your test-webhook working while real alerts stayed silent was exactly the symptom of the two paths being separate.
Sorry again for sending you to the wrong settings page halfway through.
Marcus
(and if PegaProx earns its keep for you: https://opencollective.com/pegaprox)