github prometheus-msteams/prometheus-msteams v1.3.0

New Feature

Support for custom templates per teams channel (#79)

# connectors using the default template from -template-file
- test_chan: <webhook url>

# connectors with custom template.
- request_path: /uri
  template_file: ./default-message-card.tmpl
  webhook_url: <webhook url>
  escape_underscores: false


Auto escaping of underscores from Alertmanager is now configurable and is enabled by default. It can be disabled using the -auto-escape-underscores=false flag or using env AUTO_ESCAPE_UNDERSCORES=false. The default message template is also updated.

Without the auto escaping feature, if the alertname is some_text_with_underscore, you have to do this in the template.

 {{- js .CommonLabels.alertname | reReplaceAll "_" "\\\\_" | reReplaceAll `\\'` "'" -}}

With the auto escaping feature, you don't have to use reReplaceAll anymore.

{{- .CommonLabels.alertname -}}


Using the flags -teams-incoming-webhook-url, -teams-request-uri, and -config-file altogether is now accepted. The result is -teams-incoming-webhook-url and -teams-request-uri will be added as an additional connector.

Added validation to ensure that duplicate request path are not created.

latest releases: prometheus-msteams-0.6.0, prometheus-msteams-0.5.2, prometheus-msteams-0.5.1...
8 months ago