Need the Grafana slack monitoring alert? Let’s create it now.

Reading Time: 3 minutes

In my previous blog, we created the first Grafana dashboard. Now in this blog, we will create our first monitoring Grafana alert.

Before creating monitoring alerts, we need to add the notification channel through which we will be notified. Here, we will be adding slack as the notification channel.

Slack notification channel:

First, open the URL http://localhost:3000 in the browser and log in to the Grafana. Then click on the “Notification Channels” option at the left-hand side.


Then click on “Add Channel” button and you will get the following screen:


Then, select the Slack from Type field and provide the Slack webhook URL. (Other fields are not mandatory). We can set up other alerts as well by selecting the option from Type field. For slack webhook URL, please see the guide here.

Few key points:

  • If you want to add this channel to all the alerts by default then tick the checkbox for “Send on all alerts”.
  • If you want reminders then tick the checkbox for “Send reminders” and reminder frequency time.

You can test the setup by clicking on “Send Test” button at the bottom.  After setting up all the fields, just click on the Save button. For more details, check out here.

Now let’s create the alert.

Go to Dashboard → Manage →  (Please find these options at left-hand side). Click on Dashboard Edit to set alerts:


Go to the Alert section of the dashboard and create an alert there:


In alert section, Set the Alert Config and Notification as per the requirement.

alert config:


In alert config, we need to add the conditions. We can add multiple conditions here. We need to use either AND or OR to make the relationship between multiple conditions.

As a condition, we get only 5 options:


You will find “Evaluate every” option there which takes 2 values:

  1. every: Within how many seconds/minutes conditions need to be evaluated
  2. for: For how long the condition needs to be evaluated.

For ex: Evaluate every 20s for 40s.

It means conditions will be evaluated in every 20 seconds but for 40 seconds. It means it will be evaluated 2 times.

Alert is having 3 states:

  • OK: When the overall value of conditions are false
  • Pending: When the overall value of conditions is true
  • Alerting: When the overall value of condition is true continuously until the value of for.

If we take the above example then it will go in alerting mode when the conditions get true for continuous 40 seconds.



Here, we add the notification channel where alert needs to be sent and the alert message. For more details, check out here.

That’s it. I hope, it will be helpful for you and you will be able to create your first alert easily.



Written by 

Rishi is a tech enthusiast with having around 10 years of experience who loves to solve complex problems with pure quality. He is a functional programmer and loves to learn new trending technologies. His leadership skill is well prooven and has delivered multiple distributed applications with high scalability and availability by keeping the Reactive principles in mind. He is well versed with Scala, Akka, Akka HTTP, Akka Streams, Java8, Reactive principles, Microservice architecture, Async programming, functional programming, distributed systems, AWS, docker.