Re: [prometheus-users] Send resolved without slack

2021-05-14 Thread Matthias Rampke
Use conditions within the template. See the Go documentation for the basic language: https://golang.org/pkg/text/template/ /MR On Fri, May 14, 2021, 10:36 Sebastian Glock wrote: > Ok I see problem, but how can i separate email subjects from alert and > alert-resolved? Can I somehow insert 2

Re: [prometheus-users] Send resolved without slack

2021-05-14 Thread Sebastian Glock
Ok I see problem, but how can i separate email subjects from alert and alert-resolved? Can I somehow insert 2 templates of email or 2 templates of subject into 1 alert? How alertmanager will know when to use 1st template and second? pt., 14 maj 2021 o 08:45 Sebastian Glock napisał(a): > Ok so

Re: [prometheus-users] Send resolved without slack

2021-05-14 Thread Sebastian Glock
Ok so this one should look like this: - alert: CPU load is more than 80%! expr: 100 - (1 -avg(irate(windows_cpu_time_total{mode="user"}[10m])) by (instance)) * 100 >= 40 for: 10s labels: severity: "[High]" annotations: summary: "CPU load is more than 80%!"

Re: [prometheus-users] Send resolved without slack

2021-03-31 Thread Matthias Rampke
To Prometheus, "resolved" is not a separate first class event. As long as an alert is "firing" in Prometheus, it sends a constant stream of "still firing" messages to Alertmanager. If there are multiple alerts firing, or multiple label combinations for one alert, there's more notifications. AM

Re: [prometheus-users] Send resolved without slack

2021-03-31 Thread Sebastian Glock
I have something like this: global: route: receiver: alert-emailer-cpu-30m group_by: ['alertname', 'priority', 'instance'] group_wait: 10s group_interval: 10s repeat_interval: 30m # resolve_timeout: 10s routes: #rebooted - receiver: alert-emailer-reboot-30m

Re: [prometheus-users] Send resolved without slack

2021-03-30 Thread Matthias Rampke
I *think* you can have one email config, and toggle whether to show [RESOLVED] as part of the template. Looking at the default templates , it seems like the way to do that is to check for the length of .Alerts.Firing and

Re: [prometheus-users] Send resolved without slack

2021-03-30 Thread Stuart Clark
On 29/03/2021 14:20, Sebastian Glock wrote: I tried to do something like this: ``` - name: alert-emailer-cpu-1h   email_configs:   - to: 'sebastian.glock@ecom.software'     send_resolved: false     from: '*'     smarthost:'*'     auth_username: '*'     auth_password: '*'    

Re: [prometheus-users] Send resolved without slack

2021-03-29 Thread Sebastian Glock
I tried to do something like this: ``` - name: alert-emailer-cpu-1h email_configs: - to: 'sebastian.glock@ecom.software' send_resolved: false from: '*' smarthost:'*' auth_username: '*' auth_password: '*' auth_secret: '*' auth_identity:'*'

Re: [prometheus-users] Send resolved without slack

2021-03-29 Thread Stuart Clark
On 29/03/2021 08:31, Sebastian Glock wrote: Hi, is there any way to configure send resolved without slack? I only found configuration with slack channel. I tried to add send resolved on true but it's not working. Is that even possible? -- Which method(s) are you trying to use? -- Stuart

[prometheus-users] Send resolved without slack

2021-03-29 Thread Sebastian Glock
Hi, is there any way to configure send resolved without slack? I only found configuration with slack channel. I tried to add send resolved on true but it's not working. Is that even possible? -- You received this message because you are subscribed to the Google Groups "Prometheus Users"