Can't add new Slack channels to notification channels on Alerting

I'm trying to add a new Slack notification channel so I can change the slack channel that I'm using to send an alert to. When I try add a channel it asks me to authorize slack, which I do and then it redirects to Google Cloud's Alerting section and then it gets stuck.

I've tried in both Brave and Firefox and I still can't add a new slack channel.

Here is where you go to manage your notification channels and then I click on add new for Slack(I already have a few configured but I want to add a new one):

Screenshot 2024-02-08 at 10.29.50.png

 Here it redirects to Slack

Screenshot 2024-02-08 at 10.30.15.png

 Then it just gets stuck here: 

Screenshot 2024-02-08 at 10.31.01.png

 

Solved Solved
0 3 863
1 ACCEPTED SOLUTION

Hello @timogoosen ,

Welcome to the Google Cloud Community. I've checked this at newly created workspace. At the first time I've got white page. I've tried once more and I was able to add integration. Maybe you are choosing wrong workspace ? Additionally, did you've tried to add this channel via CLI?

To add a Slack notification channel via CLI, you can use the following command:

 

 

gcloud alpha monitoring channels create slack --project=PROJECT_ID --display-name=CHANNEL_NAME --slack-webhook-url=SLACK_WEBHOOK_URL

 

Where:

PROJECT_ID is your project ID.

For example, to add a Slack channel named "My Channel" with the webhook URL " https://hooks.slack.com/services/T00000000/B00000000/XXXXXXXXXXXXXXXX  ", you would use the following command:

 

 

gcloud alpha monitoring channels create slack --project=webaap-wordpress-load --display-name=My Channel --slack-webhook-url=https://hooks.slack.com/services/T00000000/B00000000/XXXXXXXXXXXXXXXX

 

Once you have created the channel, you can verify that it was created by running the following command:

 

 

gcloud alpha monitoring channels list --project=PROJECT_ID

 

 

 
cheers,
DamianS

View solution in original post

3 REPLIES 3

Hello @timogoosen ,

Welcome to the Google Cloud Community. I've checked this at newly created workspace. At the first time I've got white page. I've tried once more and I was able to add integration. Maybe you are choosing wrong workspace ? Additionally, did you've tried to add this channel via CLI?

To add a Slack notification channel via CLI, you can use the following command:

 

 

gcloud alpha monitoring channels create slack --project=PROJECT_ID --display-name=CHANNEL_NAME --slack-webhook-url=SLACK_WEBHOOK_URL

 

Where:

PROJECT_ID is your project ID.

For example, to add a Slack channel named "My Channel" with the webhook URL " https://hooks.slack.com/services/T00000000/B00000000/XXXXXXXXXXXXXXXX  ", you would use the following command:

 

 

gcloud alpha monitoring channels create slack --project=webaap-wordpress-load --display-name=My Channel --slack-webhook-url=https://hooks.slack.com/services/T00000000/B00000000/XXXXXXXXXXXXXXXX

 

Once you have created the channel, you can verify that it was created by running the following command:

 

 

gcloud alpha monitoring channels list --project=PROJECT_ID

 

 

 
cheers,
DamianS

Thanks I tried again, but going directly to manage "notification channels" now it works.

Seems if you try do it from an existing alert and you try manage notifications from an existing alert then it won't work even if you try again.

Thanks for your help.
If anyone at google sees this please fix it. Your welcome to reach out to me if you want more details to replicate the issue exactly.

I can confirm this is still an issue, and that the solution above works. 

  • Attempting to add a new slack channel to notification channels directly from the Create Alerting Policy flow will fail at a white screen after authorizing slack. The browser console has a stack of 404 errors.  
  • Adding a new slack channel to notification channels after navigating specifically to the Notification Channels page works.