HUB
Sign inSign up
prometheus-cachet-glue logo

matrixdotorg/prometheus-cachet-glue

By matrixdotorg

•Updated over 8 years ago

A microservice that takes in Prometheus Alertmanager webhooks and calls the Cachet API based on that

Image
0

590

matrixdotorg/prometheus-cachet-glue repository overview

⁠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

Tag summary

Content type

Image

Digest

Size

7.5 MB

Last updated

over 8 years ago

docker pull matrixdotorg/prometheus-cachet-glue:v0.4.0