How to configure Slack in your on-prem Sentry

@evanpurkhiser I forked the 9.1.1 release and patched the Slack integration per your PR. Everything seems to work during installation etc, but when I try to add an alert it says
The slack resource "my-channel" does not exist or has not been granted access in the my-workspace Slack workspace.
I looked at the RDS instance and it’s storing the bot access token properly, and on the Slack side it shows that the installation authorized everything. Any ideas?

Nevermind - it’s the 1000 objects limit. Slack recommends using https://api.slack.com/methods/conversations.list btw, which should handle private, public, and member conversations.

WIth 9.1.2 released, working through this… Does it need the interactive part? Our on-premise sentry is not accessible from the outside world.

FYI slack setup for sentry.io is at:
https://docs.sentry.io/workflow/integrations/global-integrations/#slack

If you want to resolve issues from Slack, yes. If you are just looking for notifications in your Slack, then no :slight_smile:

@evanpurkhiser would it be possible to create a similar walkthru for 9.1.2 and upwards? We just upgraded and I was hoping that would simplify the process, but I’m getting the same oauth error as always. Feels like most documentation still targets pre-9.1.2 so I have no idea what to do.

1 Like

You also need to enable a Bot User. Change the app -> “Add features and functionality” -> Bots -> setup a user and save

Has anyone got this non-legacy Slack integration working with Sentry 9.1.2 yet? I followed this guide and am able to grant scopes but I think they are not enough because alert rules are not created, per the integration dialog message:

The Slack integration adds a new Alert Rule action to all projects. To enable automatic notifications sent to Slack you must create a rule using the slack workspace action in your project settings.

When I try to add the rule manually after granting scopes from the oauth flow (just read:links and write:links) I get:

The slack resource “myproject-errors” does not exist or has not been granted access in the My Company workspace.

I’ve allowed scopes for reading public channels, etc, to my Sentry Slack App, but I think the problem is that only “links:read” and “links:write” are requested by https://github.com/getsentry/sentry/blob/master/src/sentry/integrations/slack/integration.py

Does that sound right, or am I missing something and this is working for other folks with 9.1.2 on-prem?

Hey @yekibud: I’ll see if I can revisit this when I’m in the office this Monday, and verify if this guide needs adjustments.

1 Like

I’m also having this problem. I added my parameters to config.yml, but when I click “Add Workspace” I get "OAuth Error: Please specify client_id".

I do have this in my config.yml

slack.client-id: 'xxx'
slack.client-secret: 'xxx'
slack.verification-token: 'xxx'

Solved it, read more here: https://github.com/getsentry/sentry/issues/9004#issuecomment-526623607

I didn’t do the full configuration myself (so no walkthrough/guide), but just wanted to confirm that I do have self-hosted Sentry 9.1.2 running with the new global Slack integration configured and working beautifully. :slight_smile:

Thanks for building this out zeeg (and team)!

1 Like

I was able to get messages to post to my slack channels using the new integration, however, I cannot get the attachment events to work. When I click “Resolve” I get a message in the console that reads
error: "401_client_error"
is_temp: true
ok: false
response: "Darn – that didn't work (error message: '401_client_error'). Manage the app at ..."

Am I missing permissions on the oauth side? Anyone else have this issue?

We’re on v10 and the new integration doesn’t seem to work…

Also mail doesn’t work either (test email works). Am I doing something wrong?

apparently On-prem sentry alerts -> slack notification messages are not working.

Yes, there’s a known issue regarding our new Slack integration right now and we are working on it. Will update on the main beta announcement thread once that is resolved. Apologies for the inconvenience.

1 Like

I have a few questions that maybe could help others too:

I want to add a new slack channel for notifications, is this possible?
If I already have one, it have to be added on the same workspace?
Can be more than one workspace at the same time?
What are the current alternatives/ways to implement slack notifications?
Legacy integration, new integration and Webhooks?

I read a lot of doc but it’s not clear for me.
Thanks

I want to add a new slack channel for notifications, is this possible?

Yes

If I already have one, it have to be added on the same workspace?
Can be more than one workspace at the same time?

You may install a second instance of the Slack integration to have multiple workspaces

What are the current alternatives/ways to implement slack notifications?

The Slack Integration is the supported way. There is a no longer supported old slack plugin which is no longer available on sentry.io if you didn’t already have it installed

Legacy integration, new integration and Webhooks?

New Integration

Is there anything specific you’re having problems with?

@evanpurkhiser Thanks for the answer.

The problem is that I can’t add a second slack instance (new integration) in the Organization Settings section. When I press the Add another button it throws me an pop-up showing invalid_team_for_non_distributed_app.

I’ve searched this error and I found a few solutions for slack apps, but for the new Sentry integration had no luck.