Skip to content

dmitry-yackevich/alertmanager-sentry-gateway

 
 

Repository files navigation

alertmanager-sentry-gateway

alertmanager-sentry-gateway is a webhook gateway for Alertmanager. This gateway receives webhooks from Alertmanager and sends alert information as an event to Sentry.

Install

Just want the binary?

Go to the releases page, find the version you want, and download the tarball file.

Run as container?

$ docker pull summerwind/alertmanager-sentry-gateway:latest

Building binary yourself

To build the binary you need to install Go, dep and task.

$ task vendor
$ task build

Usage

Sentry's DSN is required to run this gateway.

$ alertmanager-sentry-gateway --dsn ${SENTRY_DSN}

Event body of Sentry can be customized with a template file as follows. The data passed to the template file is an Alert of Alertmanager.

$ vim template.tmpl
{{ .Labels.alertname }} - {{ .Labels.instance }}
{{ .Annotations.description }}

Labels:
{{ range .Labels.SortedPairs }} - {{ .Name }} = {{ .Value }}
{{ end }}
$ alertmanager-sentry-gateway --dsn ${SENTRY_DSN} --template template.tmpl

Alertmanager Configuration

To enable Alertmanager to send alerts to this gateway you need to configure a webhook in Alertmanager.

receivers:
- name: team
  webhook_configs:
  - url: 'http://127.0.0.1:9096'
    send_resolved: false

About

Sentry gateway for Alertmanager

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Go 95.4%
  • Dockerfile 4.6%