DEV Community

Nitesh Singhal
Nitesh Singhal

Posted on • Originally published at Medium

16 1

Sending Grafana notifications on Teams channel

Image by [Nitesh Singhal](https://medium.com/@niteshsinghal85)

In this short tutorial we will learn how to send notifications from Grafana to Microsoft teams channel.

For this tutorial, I am using latest version of Grafana, It is important to know that from version 8.3 Grafana has changed the way of configuring alerts and notification, so this article will be applicable from version 8.3 onwards.

so let’s setup Teams channel first

Configuring Microsoft teams

Create Teams channel: I am creating a new Teams channel called “Grafana” so that I get all the Grafana notifications here.

Teams channel

Click on three dots on the “Grafana” channel and click on Connectors, it will show all the available connectors.

Adding connector

We need to configure Incoming webhook for receiving the notification from Grafana

Configuring Webhook

We need to provide necessary information and click on create button.

Configuring Webhook

You will see a URL is created like in below image.

Incoming webhook URL

Copy the URL, We will need to provide this in Grafana.

Good our Teams channel setup is ready.

Now let’s move to our Grafana instance


Configuring Grafana

For this experiment, I am running a docker version of Grafana

With new version of Grafana, we have to configure contact points.

Let’s configure one for MS teams.

configure contact point

configure contact point

We can send test notification by clicking test button.

Let’s try and see the what happens

Test notification in Teams

as you can see, we have received a test notification in Teams channels.

Now go to notification policies tab in Grafana UI. By default we already have one notification policy configured.

Let’s add one more for Teams.

Adding Notification policies

Adding Notification policies

Now Grafana is ready to send notification whenever alert rule is matched.

I have configured a limit a for RatePerSecond for my API call and whenever it crosses the limit I will get real time alert like below in my teams channel.

Real time notification in Teams


Summary

With the increasing use of Microsoft teams for daily work it could be useful to get real time alert with same channel.

Although I have taken example of Grafana but the same technique can be used for getting notification from different applications.

Even you can integrate this technique in your application.

Hope it is useful.

Happy Learning..!

Originally published on Medium

Sentry blog image

How to reduce TTFB

In the past few years in the web dev world, we’ve seen a significant push towards rendering our websites on the server. Doing so is better for SEO and performs better on low-powered devices, but one thing we had to sacrifice is TTFB.

In this article, we’ll see how we can identify what makes our TTFB high so we can fix it.

Read more

Top comments (0)

The Most Contextual AI Development Assistant

Pieces.app image

Our centralized storage agent works on-device, unifying various developer tools to proactively capture and enrich useful materials, streamline collaboration, and solve complex problems through a contextual understanding of your unique workflow.

👥 Ideal for solo developers, teams, and cross-company projects

Learn more

👋 Kindness is contagious

Explore a sea of insights with this enlightening post, highly esteemed within the nurturing DEV Community. Coders of all stripes are invited to participate and contribute to our shared knowledge.

Expressing gratitude with a simple "thank you" can make a big impact. Leave your thanks in the comments!

On DEV, exchanging ideas smooths our way and strengthens our community bonds. Found this useful? A quick note of thanks to the author can mean a lot.

Okay