Quite possibly *none* of your sub-matchers are matching, and it's falling
back to the default receiver 'middleEarth-alerts-prod-critical' which is at
the same level as routes:
route:
routes:
- matchers: [ owner = middleEarth ]
receiver: 'middleEarth-alerts'
routes:
- matchers: [ alertname = MordorThreatens ]
* receiver: 'middleEarth-alerts-prod-critical' << this is used
if *none* of the routes below match*
routes: ...
But without seeing your actual alert labels and conditions I can't give any
more help.
There is an alert route testing tool you can use online, and you can paste
in your *real* labels and matchers:
https://prometheus.io/webtools/alerting/routing-tree-editor/
On Tuesday, 18 July 2023 at 18:42:13 UTC+1 realElonMusk wrote:
> Hello,
>
> I'm experiencing an issue with the *continue: true* option in my
> Prometheus alert routing setup. Here's the configuration:
>
> route:
> routes:
> - matchers: [ owner = middleEarth ]
> receiver: 'middleEarth-alerts'
> routes:
> - matchers: [ alertname = MordorThreatens ]
> receiver: 'middleEarth-alerts-prod-critical'
> routes:
> - matchers: [ realm =~ 'middleEarth-.*.middle-earth.com' ]
> receiver: 'middleEarth-alerts-prod-critical'
> continue: true
> - matchers: [ realm = 'middleEarth-rohan.middle-earth.com' ]
> receiver: 'rohan-alerts'
> continue: true
> - matchers: [ realm = 'middleEarth-rivendell.middle-earth.com'
> ]
> receiver: 'rivendell-alerts'
> continue: true
> - matchers: [ realm = 'middleEarth-shire.middle-earth.com' ]
> receiver: 'shire-alerts'
> continue: true
> - matchers: [ realm = 'middleEarth-moria.middle-earth.com' ]
> receiver: 'moria-alerts'
> continue: true
>
> In this setup, when an alert with realm='
> middleEarth-shire.middle-earth.com' is triggered, it successfully matches
> against the first route and is routed to the
> 'middleEarth-alerts-prod-critical' receiver as expected. However, the
> routing doesn't continue to the next matchers. Specifically, the alert is
> never matched against realm='middleEarth-shire.middle-earth.com' to be
> sent to the 'shire-alerts' receiver, even though *continue: true* is set.
>
> I've verified the labels and they seem to be correct. Why does the alert
> routing not continue after the first match? Any insights on how to resolve
> this issue would be greatly appreciated.
>
> Thank you.
>
>
>
--
You received this message because you are subscribed to the Google Groups
"Prometheus Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/prometheus-users/cb66a831-7df0-4079-b0e9-38235c5faec8n%40googlegroups.com.