Slack integration - get the bot to ping @channel on alert

leejhampton1 February 7, 2022

Hi, I have ops genie set up to send alerts to a Slack channel when they are triggered. What I'd like to do is create a small "buffer" between the alert hitting the channel and the person on call getting paged, so other team members in more convenient time zones get a chance to respond. In order for this to be successful, I'd like the OpsGenie bot to ping the whole channel with `@channel` so team members have an opportunity to see and respond to the alert within the window. 

 

I can't seem to find anything in the integration that can accomplish this. Is there any way to somehow prepend an `@channel` to the message? I use prometheus to generate the original alert text, so I guess I could put that in the original alert description, but my gut tells me that won't get translated to the `@channel` handle by the time it propogates through the bot. 

1 answer

0 votes
Nick H
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
February 7, 2022

Hi @leejhampton1 ,

Including "@channel" in the Message of the alert will not notify the members of the Slack channel as expected when this command is executed.

Having said that - including "@channel" in the Description of the alert will. The Description of the alert can be included with what's sent to Slack.

slack5.jpg

 

Under the Prometheus integration, you could include a hardcoded  "@channel" in the Description field. This can be configured under the Advanced tab of the integration:

slackcomm1.jpgslackcomm2.jpg

 

Otherwise you can configure an Alert Policy under the team receiving these alerts that modifies your alerts and includes the "@channel" in each alert's description:

slack4.jpgslack3.jpg

 

Hope that helps!

FYI - Both of the features listed above are only available on the Opsgenie Standard and Enterprise plans.

Alert Policies

Advanced Integrations

Nick H
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
February 7, 2022

Here's a test to confirm this should work as expected using an Alert Policy - which added "@channel" to the alert's description - and notified the channel:

slack6.jpgslack7.jpgslack8.jpg

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events