Hi, Guys can you tell me how to use such matchers ...
# developer
s
Hi, Guys can you tell me how to use such matchers in route for alertmanager?
Copy code
- matchers:
      name: severity
      matchType: '=~'
      value: 'warning|critical'
    receiver: 'email'
    continue: true
It seams there is some odd logic to transform this
alertmanager-rancher-monitoring-alertmanager
secret, but this secret is not used by alertmanager, instead the another secret is created under the name
alertmanager-rancher-monitoring-alertmanager-generated
but hit one is only cretead from the first one if the first one is somehow valid. There is no error or anything like that but the content is like below:
Copy code
route:
  receiver: "null"
receivers:
- name: "null"
templates: []
If I use match like that:
Copy code
- match:
      alertname: CPUThrottlingHigh
    receiver: email
then the generated secret is fine and I got my alert. So is anyone here who know how this secret logic works about alerting, and can provide some example for using matchers as it seams its very unclear how to update it in proper way in rancher.