I'm wanting to post exceptions to slack, but want to be able to quickly differentiate between warnings and errors.
Slack supports setting a colour on the side of the message using attachments: https://api.slack.com/docs/attachments.
How would I set the attachment colour via the Slack Notification Alert?
In this case, you must construct additional pylons er, I mean develop some custom code.
If you download the Slack Notification Alert App, in the bin directory you'll find slack.py. This is the script that kicks off the call to Slack when needed, but you'll note that it doesn't use attachments as part of the request to Slack. You'll probably also want to learn how to modify other parts of the modular alert to allow users to specify the color to send with when configuring the alert. The Splunk Docs go into more depth about how to build Custom Modular Alerts.
In this case, you must construct additional pylons er, I mean develop some custom code.
If you download the Slack Notification Alert App, in the bin directory you'll find slack.py. This is the script that kicks off the call to Slack when needed, but you'll note that it doesn't use attachments as part of the request to Slack. You'll probably also want to learn how to modify other parts of the modular alert to allow users to specify the color to send with when configuring the alert. The Splunk Docs go into more depth about how to build Custom Modular Alerts.