You need to access the Grafana instance running inside your Sourcegraph instance directly (as opposed to through the site admin Monitoring page). Please follow [these instructions](../monitoring_and_tracing.md#Accessing Grafana directly) to do that.
You need to have Grafana admin privileges to set up a new alert channel. To do that append /login
to the direct
Grafana access URL you set up in step 1. If you are doing this the first time, use username/password admin/admin
and
then change to a password of your choice. Otherwise use your admin username/password combination.
Click on the Bell
icon on the left sidebar and select Notification channels.
Click on Add Channel.
and select Slack from the Type
pulldown. Give the channel a name (this is to identify it
in the Grafana alert channels list and does not specify to which Slack chnannel the alerts are going).
In a separate browser tab go to https://api.slack.com/apps
to create a new Slack App.
Create an App
button, give the new app a name and click Create App
button.Incoming Webhooks
and toggle Activate Incoming Webhooks
to on.Add New Webhook to Workspace
.Paste the web hook into the channel form Url field.
Test by clicking Send Test
button. You should see a test alert in the Slack channel you selected when you created
the web hook.
If everything works, save your new alert channel.
Other alert channel types are configured in a way similar to the Slack alert channel type described above. Choose the appropriate channel type and provide the necessary information for that type.