Blog

Microsoft Teams Alerts for Kubernetes Cluster: Setting Up Alertmanager with Prometheus-MSTeams Helm Chart

16.07.2024
Reading time: 2 mins.
Last Updated: 17.09.2025

Table of Contents

Integrating Alertmanager with Microsoft Teams enables you to receive alerts directly in Teams channels, facilitating swift collaboration with your team to address issues promptly. This guide will use Prometheus-MSTeams, a lightweight Go Web Server designed to bridge the gap between Prometheus Alertmanager and Microsoft Teams.

Alertmanager by itself cannot format notifications correctly for the Microsoft Teams webhook. This limitation necessitates the use of Prometheus-MSTeams, which converts the POST alert messages from Prometheus Alertmanager into a format compatible with Teams. In our setup, we will deploy Prometheus-MSTeams using a Helm chart in Kubernetes, ensuring a seamless integration and efficient alert management within your Kubernetes cluster.

helm repo add prometheus-msteams https://prometheus-msteams.github.io/prometheus-msteams/
helm upgrade --install msteams prometheus-msteams/prometheus-msteams -n monitoring

After the installation, it’s crucial to verify that the pods and deployment are running correctly. You can do this by executing the following commands:

kubectl get deployments -n monitoring
Microsoft Teams Alerts
kubectl get pods -n monitoring
Kubernetes Cluster
kubectl get svc -n monitoring
MS Teams Alerts for Kubernetes Cluster: Setting Up Alertmanager with Prometheus-MSTeams Helm Chart - status of the services

To configure the new channel, simply navigate to “Connectors,” add an “Incoming Webhook,” and specify a name of your choice.

MS Teams Alerts for Kubernetes Cluster: Setting Up Alertmanager with Prometheus-MSTeams Helm Chart - create a chennel
MS Teams Alerts for Kubernetes Cluster: Setting Up Alertmanager with Prometheus-MSTeams Helm Chart -monitoring team

Copy the URL and save it.

MS Teams Alerts for Kubernetes Cluster: Setting Up Alertmanager with Prometheus-MSTeams Helm Chart - webhook

We need to edit the ConfigMap for Prometheus-MSTeams Configuration:

kubectl edit cm prometheus-msteams-config -n monitoring

MS Teams Alerts for Kubernetes Cluster: Setting Up Alertmanager with Prometheus-MSTeams Helm Chart

In this step, we configure a new connector named “alertmanager-teams” in Prometheus-MSTeams, using the incoming webhook URL previously created in Microsoft Teams.

MS Teams Alerts for Kubernetes Cluster: Setting Up Alertmanager with Prometheus-MSTeams Helm Chart - configure alertmanager

http://prometheus-msteams: This is the hostname of the Prometheus-MSTeams service in your Kubernetes cluster, assuming it’s accessible via the service name prometheus-msteams.

:2000: This is the port number where Prometheus-MSTeams listens for incoming alerts, configured here as port 2000.

alertmanager-teams: This path represents the name of the connector (endpoint) in Prometheus-MSTeams where it expects to receive alerts from.

After configuring Alertmanager with the new connector as a receiver, it is important to verify that alerts are properly being sent to your Microsoft Teams channel.

MS Teams Alerts for Kubernetes Cluster: Setting Up Alertmanager with Prometheus-MSTeams Helm Chart -0 Alertmanadger
MS Teams Alerts for Kubernetes Cluster: Setting Up Alertmanager with Prometheus-MSTeams Helm Chart - alert

Integrating Alertmanager with Microsoft Teams through Prometheus-MSTeams ensures that alerts are formatted correctly and delivered efficiently to your Teams channels. This integration enhances your team’s ability to respond to issues promptly within your Kubernetes cluster.

Explore ITGix services and learn more about our expertise.

Leave a Reply

Newsletter for Tech experts

Signal, not noise -

straight to your inbox.

Join 12,000+ engineers and business leaders getting field notes on SRE, DevOps and cloud- native reliability.

Deep-dive tech blogs & case studies
Emerging tech, curated

Your Work Email

We respect your inbox. Read our Privecy Policy

More Posts

AI SRE Agent: Turning the First 20 Minutes of an Incident Into Automation It’s 3am. An alert fires. You open your laptop, and the next twenty minutes look like every...
Reading
When working with Terraform, the default meta-argument for creating resources should almost always be for_each – especially for infrastructure that is expected to live for a long time and evolve...
Reading
Get In Touch
ITGix provides you with expert consultancy and tailored DevOps services to accelerate your business growth.
Newsletter for
Tech Experts
Join 12,000+ business leaders and engineers who receive blogs, e-Books, and case studies on emerging technology.