getting namespace name in slack's channel and email's to config fields

35 views
Skip to first unread message

manjeet kadam

unread,
Apr 11, 2020, 3:40:02 PM4/11/20
to Prometheus Users
We are trying to route alerts based on namespace Names using email and slack config. Basically, if pod is deployed in test namespace then send email to te...@xxx.com and slack to #test channel. I tried accessing {{ .Labels.namespace }} in email’s to option and also slack’s channel option. It gives “can’t evaluate field Labels in type *template. Data”. Any help would be appreciated.

Thanks.

manjeet kadam

unread,
Apr 13, 2020, 6:06:51 PM4/13/20
to Prometheus Users
I found the issue. Thanks.

Pierre Essdévé

unread,
May 25, 2022, 3:57:18 AM5/25/22
to Prometheus Users
Hi Manjeet,

Can you share with us how you solved that issue ?

Thanks in advance
Reply all
Reply to author
Forward
0 new messages