Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

channel() with slack does not work any more #2470

Closed
ASunc opened this issue Jan 21, 2021 · 5 comments · Fixed by #2560
Closed

channel() with slack does not work any more #2470

ASunc opened this issue Jan 21, 2021 · 5 comments · Fixed by #2560
Assignees
Labels

Comments

@ASunc
Copy link

ASunc commented Jan 21, 2021

When trying to send an alert to slack channel, it always goes to default channel of the slack webhook.
Ie. calling slack().channel('#xyz') won't have any effect.

I think this is because slack has deprecated legacy webhooks. Incoming webhooks don't support channel property.

@joshdurbin
Copy link

I've seen this issue too, with version 1.5.7.

@docmerlin docmerlin added the bug label Feb 4, 2021
@docmerlin docmerlin self-assigned this Feb 4, 2021
@docmerlin
Copy link
Contributor

Thanks!

@docmerlin docmerlin added this to the 1.5.9 milestone Feb 4, 2021
@psteinbachs psteinbachs removed this from the 1.5.9 milestone Feb 17, 2021
@erkexzcx
Copy link

erkexzcx commented Mar 5, 2021

Hi. Any updates on this issue?

@lesam lesam self-assigned this May 26, 2021
@lesam
Copy link
Contributor

lesam commented May 27, 2021

Did you create your Incoming Webhook through the link in the docs? https://slack.com/services/new/incoming-webhook

New-style Incoming Webhooks as part of slack apps are tied to the channel you created them on, but the legacy webhooks at that link should still work and allow configuring the correct channel.

We are working on supporting new-style webhooks and documenting the correct configuration.

@lesam
Copy link
Contributor

lesam commented May 27, 2021

The token argument below will be newly available configuration in Kapacitor 1.6:

	// The Slack webhook URL, can be obtained by adding Incoming Webhook integration.
 	// The Slack webhook URL.
 	// For new-style slack apps, use "https://slack.com/api/chat.postMessage".
 	// For legacy webhooks (e.g. created at https://slack.com/services/new/incoming-webhook), use the webhook link.
 	URL string `toml:"url" override:"url,redact"`
 	// The Slack OAuth token.
 	// For new-style slack apps, go to https://api.slack.com/apps -> your app -> 'OAuth & Permissions' to find
 	// the token. Ensure your app has 'chat:write' and 'chat:write.public' permissions.
 	// For legacy webhooks this can be left blank.
 	Token string `toml:"token" override:"token,redact"`

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants