prometheus-msteams/prometheus-msteams

Chart version: 0.5.1
Api version: v1
App version: v1.3.5
A Helm chart for Kubernetes
application
Chart Type
Active
Status
Unknown
License
882
Downloads
https://prometheus-msteams.github.io/helm-chart
Set me up:
helm repo add center https://repo.chartcenter.io
Install Chart:
helm install prometheus-msteams center/prometheus-msteams/prometheus-msteams
Versions (0)

Installing the Chart

  • Download the chart
  • Prepare the Deployment configuration
  • Deploy to Kubernetes cluster
  • When using with Prometheus Operator
  • Customise messages to MS Teams
  • Helm Configuration

Download the chart

Clone this repository.

helm repo add prometheus-msteams https://prometheus-msteams.github.io/helm-chart/

Prepare the Deployment configuration

Create a helm values file to configure your Microsoft Teams channel connectors and customise the Kubernetes deployment.

# config.yaml
---
replicaCount: 1
image:
  repository: quay.io/prometheusmsteams/prometheus-msteams
  tag: v1.3.5

connectors:
# in alertmanager, this will be used as http://prometheus-msteams:2000/bar
- bar: https://outlook.office.com/webhook/xxxx/xxxx 
# in alertmanager, this will be used as http://prometheus-msteams:2000/foo
- foo: https://outlook.office.com/webhook/xxxx/xxxx

# extraEnvs is useful for adding extra environment variables such as proxy settings
extraEnvs:
  HTTP_PROXY: http://corporateproxy:8080
  HTTPS_PROXY: http://corporateproxy:8080
container:
  additionalArgs:
    - -debug

# Enable metrics for prometheus operator
metrics:
  serviceMonitor:
    enabled: true
    additionalLabels:
      release: prometheus # change this accordingly
    scrapeInterval: 30s

See Helm Configuration and App Configuration for reference.

Deploy to Kubernetes cluster

helm upgrade --install prometheus-msteams \
  --namespace default -f config.yaml
  prometheus-msteams/prometheus-msteams

When using with Prometheus Operator

Please see Prometheus Operator alerting docs.

Customise messages to MS Teams

This application uses a Default Teams Message Card Template to convert incoming Prometheus alerts to teams message cards. This template can be customised by specifying the value of customCardTemplate parameter. Simply create a new file that you want to use as your custom template (for example, custom-card.tmpl). You can use the --set-file flag to set the value from this file:

helm upgrade --install prometheus-msteams \
  --namespace default -f config.yaml \
  --set-file customCardTemplate=custom-card.tmpl \
  prometheus-msteams/prometheus-msteams

Otherwise you can also set the value by specifying the template data directly via values file.

Helm Configuration

Parameter Description Default
image.repository Image repository quay.io/prometheusmsteams/prometheus-msteams
image.tag Image tag v1.3.5
image.pullPolicy Image pull policy Always
extraEnvs Extra environment variables {}
connectors Add your own Microsoft Teams connectors. []
connectors_with_custom_templates Add your own Microsoft Teams connectors with custom template file. []
service.port Service port 2000
service.type Service type ClusterIP
container.port Container port 2000
container.additionalArgs additional prometheus-msteams flags to use {}
resources Pod resources See default
nodeSelector Pod nodeSelector {}
affinity Pod affinity {}
tolerations Pod tolerations {}
priorityClassName Pod priority class ""
podAnnotations Pod annotations {}
podSecurityContext Pod securityContext See default
customCardTemplate Custom message card template for MS teams ""
metrics.serviceMonitor.enabled Set this to true to create ServiceMonitor for Prometheus operator false
metrics.serviceMonitor.additionalLabels Additional labels that can be used so ServiceMonitor will be discovered by Prometheus {}
metrics.serviceMonitor.honorLabels honorLabels chooses the metric’s labels on collisions with target labels. false
metrics.serviceMonitor.namespace namespace where servicemonitor resource should be created release namespace
metrics.serviceMonitor.namespaceSelector namespaceSelector to configure what namespaces to scrape release namespace
metrics.serviceMonitor.scrapeInterval interval between Prometheus scraping 30s