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):
Here it redirects to Slack
Then it just gets stuck here:
Solved! Go to 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
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
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.