Hi Christian, Thank you for your quick reply. I thought the match stanza does the filter, it didn’t work that way? And how do I set a receiver as default?
Zhang > On Jul 14, 2020, at 10:36 AM, Christian Hoffmann > <[email protected]> wrote: > > Hi, > > On 7/14/20 7:24 PM, Zhang Zhao wrote: >>> I added a filter in the alertmanager config so that only alerts that >>> contain "inc:servicenow" label are able to be fed to ServiceNow. >>> However it didn't work as expected. I still saw events that do not >>> contain this label getting fed to ServiceNow. Below was my config. >>> Please advice where was wrong. Appreciate it. >>> > [...] >>> receiver: prometheus-snow > ^^^^^^^^^^ >>> routes: >>> - receiver: "prometheus-snow" >>> match: >>> inc: servicenow > > You are still setting prometheus-snow as your default receiver. If you > want to null-route everything which doesn't match, you can define a > receiver without any details (such as "devnull") and use that as a default. > > Another option would be dropping all irrelevant alerts from ever > reaching alertmanager by using alert relabelling. > > > Kind regards, > Christian -- 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/13C534B5-A607-40AD-8FFF-334BAA26269A%40gmail.com.

