Hi, On 10/26/20 5:09 PM, [email protected] wrote: > I apologize for providing incomplete information. If the license expires > for one instance, then its name is sent to the slack, if there are 2 or > more of them, then it is sent without instance hostnames, but as in the > screenshot above, just the number of instances. [...] > slack_configs: > - channel: '#alerts' > text: 'https://prometheus/alerts' > send_resolved: true
It looks like you are mostly using the default slack config. I don't use Slack myself, but according to the docs [1], the template slack.default.title [2] kicks in, which will use a generic __subject template [3]. That template uses CommonLabels, which may explain the difference in behavior you are seeing regarding one/multiple alerts. Long story short, I think you should configure a custom title template for slack if you want to modify the existing message. Another option would be to keep the existing title and add the details to the "text" field, which may be more appropriate. You can either work through the docs yourself (the notification template syntax will help [4], along with the examples [5]) or try to find some blog posts such as [6] where people document how they tuned their Slack alerts for their needs. Kind regards, Christian [1] https://prometheus.io/docs/alerting/latest/configuration/#slack_config [2] https://github.com/prometheus/alertmanager/blob/master/template/default.tmpl#L15 [3] https://github.com/prometheus/alertmanager/blob/master/template/default.tmpl#L4 [4] https://prometheus.io/docs/alerting/latest/notifications/ [5] https://prometheus.io/docs/alerting/latest/notification_examples/ [6] https://harthoover.com/pretty-alertmanager-alerts-in-slack/ -- 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/52d1109a-3419-893f-d64b-024494b9e4e8%40hoffmann-christian.info.

