How to customize the Slack notifications for monitoring Alerts [closed]
Asked Answered
E

0

6

I have setup stackdriver monitoring, configured the alerting policy and notifications are sent via slack when incident is started/stopped with the incident details.

Is there any possibility i can customize the message format used for slack notifications? I just want to replace incident_id text with condition name

Example: I want to change the notification:

  • Incident #0.ltt7qsa4gm4k started
  • to Incident DiskUsage started
Eth answered 5/11, 2020 at 18:18 Comment(4)
In order to set up Slack channel using the Stackdriver monitoring tool you need to create a Slack channel at the Slack site 1. You can create a new account or user your existing account if it is valid and usable. Then in Stackdriver go to Workspace settings > Notifications > Slack. After that click "Authorize Stackdriver" and follow the instructions on the Slack website, you will be able to add the channel to Stackdriver Monitoring. You can find all mentioned steps in this document 2.Kumar
What document are you using to implement the Slack notifications for the monitoring Alerts ? Could you please check if this app is installed 1 for your Slack account. If it’s not please install it, generate some events/alerts and observe your notifications . Also please make sure that you are configuring this using our doc on this topic 2.Kumar
I have setup slack monitoring through the GCP console when setting up stackdriver alerting notifications. I haven't followed any doc as the GUI is easy to follow. I've checked your second doc and it just tells you how to use the GUI to create a notification channel. What I and the OP would like to do is customise the message sent over the notification channel. I find the messages rather useless, full of labels that are meaningless e.g. 'resource.type="k8s_container" and does not contain my custom metric labels that do provide important information. How to we customise the alert message?Rosewater
I think he is asking how to customize the alert messages in slack. They always start with "Incident #0.ltt7qsa4gm4k started ..." which is not usefull if you have many business critical deployments, therefore always have to check the slack message in slack app, while contextual info can be shown in ie. notification balloons in debian.Ingeminate

© 2022 - 2024 — McMap. All rights reserved.