Skip to content

yp2800/alertmanager-webhook-example

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

alertmanager-webhook-example

alertmanager-webhook-example is a simple example of a webhook receiver for the Prometheus Alertmanager. It expect to receive aleter messages in POST bodies to /alerts in JSON in the format described in the receiever webhook docs

Usage

alertmanager-webhook-example stores an array of received alert messages in memory.

$ ./alertmanager-webhook-example
Usage of alertmanager-webhook-example
  -addr string
    	address to listen for webhook (default ":8080")
  -cap int
    	capacity of the simple alerts store (default 64)
exit status 2

It expects alerts to be POSTed in JSON to /alerts. An HTTP GET to /alerts will return the alerts in memory.

Building

alertmanager-webhook-example has no external dependencies. Clone this repo into your GOPATH and run go build . in the top level of this repo.

prebuilt Docker images are available at https://quay.io/repository/bakins/alertmanager-webhook-example

LICENSE

See LICENSE

About

simple webhook receiver for Prometheus Alertmanager

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 79.7%
  • Shell 16.2%
  • Dockerfile 4.1%