Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/grafana/alertmanager-webhook-proxy
A reverse proxy for the Prometheus AlertManager webhook notifier.
https://github.com/grafana/alertmanager-webhook-proxy
Last synced: about 2 months ago
JSON representation
A reverse proxy for the Prometheus AlertManager webhook notifier.
- Host: GitHub
- URL: https://github.com/grafana/alertmanager-webhook-proxy
- Owner: grafana
- License: apache-2.0
- Created: 2022-04-28T04:19:14.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-01-01T20:14:43.000Z (over 1 year ago)
- Last Synced: 2024-07-10T13:13:43.326Z (2 months ago)
- Language: Go
- Size: 98.6 KB
- Stars: 13
- Watchers: 117
- Forks: 1
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Alertmanager Webhook Proxy
[![CircleCI](https://circleci.com/gh/grafana/alertmanager-webhook-proxy/tree/main.svg?style=svg)](https://circleci.com/gh/grafana/alertmanager-webhook-proxy/tree/main)
A reverse proxy for the Prometheus AlertManager webhook notifier. This proxy service can take in a GoLang template to modify the payload for consumers that do not support the AlertManager webhook payload.
## Build
```sh
$ go build -o awp ./cmd/main.go
```## Usage
```sh
$ ./awp -address=":8080" -target="http://my.consumer.io" -template="./template.txt"
```| Command Flag | Default | Description |
| ------------ | ------- | ----------- |
| `-address` | `:8080` | Server bind address |
| `-target` | `http://localhost:8090` | Target URL |
| `-template` | `/tmp/awp/template.txt` | Path to payload transformation template |## Templating
The proxy loads a GoLang template of your choice to transform the alertmanager
payload.For GoLang templating syntax, check out the [documentation](https://pkg.go.dev/text/template).
The AlertManager webhook payload data format is detailed [here](https://prometheus.io/docs/alerting/latest/configuration/#webhook_config).
Example templates can be found in the `templater` [test data directory](pkg/templater/testdata).