Setting up Discord notifications in Grafana

I recently suggested an idea on the Django Discord server, that is would be nice to get alerts when djangoproject.com is having issues. Tobias on the Ops team provided some pointers in regard to what they already have setup and so here is the prototyping I have done to date, which will hopefully get implemented soon (I am doing some final private testing today).

The first job is to get a Grafana Cloud account (or use an existing one) and then setup some "Synthentic Checks". Given you can only set one Alert per check, multiple might be needed. By default Grafana has 3 alerts (Low, Medium, High) so three checks would seem sensible.

Configuring Alerts in Synthetic Checks

Next is to go into "Alerts & IRM" and setup Discord as a Contact Point. Although be sure to set the alertmanager at your cluster over the default Grafana manager (this forum post helped). This involves getting a webhook from Discord related to the channel you would like to notify to.

Specifying the Grafana Alert Manager

Third is to add a notifications template as the default notification is very verbose. I followed this article based on Slack as a starting point

Configuring Contact Point with additional options

Finally is configuring the "Notifications Policies" to use Discord as the contact point. You may have existing policies in place so take care to ensure that existing policies don't get altered.

Configuring Notifications Policy

I hope to get this setup soon, but I personally don't have all the access to the necessary accounts (namely the Django grafana account). But hopefully by the end of next week we might have alerting setup in Discord! Next is to have a grafana public status page for Django.