Integration with slack does not work


#1

Hello,
It seems that the sentry does not send notifications to slack.
I configured Sentry with the right webhook and when I send some messages to Sentry I don’t get them on the slack channel. When I look to Sentry logs I don’t see any attempt to send anything to slack.
Thanks


#2

I’m using a proxy in my machine so maybe it’s related to that. but if it’s the case why I don’t see any messages in logs ?


#3

I’ve just attempted to set up Sentry and sent an event from the Python SDK through to Slack. I also do not get any notifications in Slack (email notifications are working fine).


#4

Ok, it appears that Slack’s Sentry integration is not working.
I have successfully integrated Sentry notifications using the plain old Incoming Webhook integration in Slack.


#5

@samuelleach

In my case it was the proxy configuration that’s was missing in the systemd unit configuration.
I added the proxy with these lines:

Environment=HTTP_PROXY=
Environment=HTTPS_PROXY=

Badr


#6

Having the same issue with slack webhook URL:

HTTPSConnectionPool(host='hooks.slack.com', port=443): Max retries exceeded with url: /services/T1XDQD2D8/B4KRC17AN/3TdHxGxVwPZfBHOqMpRJbAMS (Caused by NewConnectionError('<requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x7fba9dd5f490>: Failed to establish a new connection: [Errno 111] Connection refused',))

I use supervisor for keeping sentry alive and added the proxy environment variables in the config as follows:

[program:sentry-web]
user=sentry
directory=/home/sentry/
environment=
        SENTRY_CONF="/home/sentry/.sentry/",
        HTTP_PROXY="http://proxy.example.com:8080",
        HTTPS_PROXY="http://proxy.example.com:8080",
        http_proxy="http://proxy.example.com:8080",
        https_proxy="http://proxy.example.com:8080"
command=/home/sentry/bin/sentry run web
autostart=true
autorestart=true
redirect_stderr=true
stdout_logfile=syslog
stderr_logfile=syslog

[program:sentry-worker]
user=sentry
directory=/home/sentry/
environment=
        SENTRY_CONF="/home/sentry/.sentry/",
        HTTP_PROXY="http://proxy.example.com:8080",
        HTTPS_PROXY="http://proxy.example.com:8080",
        http_proxy="http://proxy.example.com:8080",
        https_proxy="http://proxy.example.com:8080"
command=/home/sentry/bin/sentry run worker
autostart=true
autorestart=true
redirect_stderr=true
stdout_logfile=syslog
stderr_logfile=syslog

[program:sentry-cron]
user=sentry
directory=/home/sentry/
environment=
        SENTRY_CONF="/home/sentry/.sentry/",
        HTTP_PROXY="http://proxy.example.com:8080",
        HTTPS_PROXY="http://proxy.example.com:8080",
        http_proxy="http://proxy.example.com:8080",
        https_proxy="http://proxy.example.com:8080"
command=/home/sentry/bin/sentry run cron
autostart=true
autorestart=true
redirect_stderr=true
stdout_logfile=syslog
stderr_logfile=syslog

(Proxy-Hostname was replaced of course)

After changing the config, I restarted all sentry processes, but it didn’t help. Still getting the above error from the Slack plugin.

Any idea what I am doing wrong?

sentry, version 8.14.1