Skip to content
This repository has been archived by the owner on Jun 7, 2022. It is now read-only.

Little daemon that takes in prometheus alertmanager webhooks and puts them onto cachet.

License

Notifications You must be signed in to change notification settings

matrix-org/prometheus-cachet-glue

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

prometheus-cachet-glue

A simple lightweight daemon that takes in webhook calls from prometheus' alertmanager and sets the state of a component according to that.

Limitations

Currently this expects the alerts array to be exactly one element.

Running

You can either run it with docker:

docker run \
  -e CACHET_BASE_URL="https://your.cachet.instance" \
  -p 8888:88888 \
  matrixdotorg/prometheus-cachet-glue

or by compiling it yourself and running it on your host directly:

CACHET_BASE_URL="https://your.cachet.instance" prometheus-cachet-glue

As seen in the commands above, you can specify your cachet instance by setting the CACHET_BASE_URL environment variable. Please note that this is not supposed to end with a slash.

The daemon is listening for http requests on port 8888. You should use a reverse proxy for TLS termination in front of that.

If the CACHET_AUTH_TOKEN env var is set, then missing Authentication headers will use that value. Only set CACHET_AUTH_TOKEN if your are running in a secure environment. If the endpoint is publically accessable without restrictions then third parties can update your status page at will.

Building

You need to have a local rust toolchain installed. To get one, go to rustup.rs.

To build it, clone the repository and run cargo install in it:

git clone https://github.com/matrixdotorg/prometheus-cachet-glue.git pcg
cd pcg
cargo install

This will take some time. Cargo installs the compiled binary into ~/.cargo/bin, which should be in your PATH.

If you want to build the docker image instead, clone the repository and run docker build in it:

git clone https://github.com/matrix-org/prometheus-cachet-glue.git pcg
docker build -t matrixdotorg/prometheus-cachet-glue pcg

About

Little daemon that takes in prometheus alertmanager webhooks and puts them onto cachet.

Resources

License

Security policy

Stars

Watchers

Forks

Packages

No packages published