-
-
Notifications
You must be signed in to change notification settings - Fork 23
Slack
rozetko edited this page Jan 19, 2021
·
2 revisions
Hastic can send alerts to Slack via Web API. You need to set the following variables in config.json:
HASTIC_ALERT_TYPE=slack
HASTIC_SLACK_API_TOKEN=xoxb-54309684609-1647159624051-nvrG4vVMCapH1aFwcgAja5TI
HASTIC_SLACK_NOTIFICATION_CHANNEL=hastic_notifications
- Create a Slack app
- Click the
OAuth & Permissions
tab in the left sidebar - Below
Bot Token Scopes
, select the scopes you need. Then clickAdd an OAuth Scope
.-
chat:write
(required) - for sending notification -
files:write
(optional) - for attaching images to notifications
-
- Copy token from
Bot User OAuth Access Token
- go to channel you want to get alerts to
- open right-side
Details
pane - click
More
- click
Add apps
- selected the app created at the previous paragraph
See article in Slack documentation for more info