Little daemon that takes in prometheus alertmanager webhooks and puts them onto cachet.
  • Rust 94.8%
  • Dockerfile 4.6%
  • Shell 0.6%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2018-07-23 19:11:52 +01:00
docker/root/etc/s6.d/pcg initial implementation (#1) 2018-05-22 10:41:13 +02:00
src improve logging 2018-07-23 16:43:47 +02:00
.gitignore initial implementation (#1) 2018-05-22 10:41:13 +02:00
Cargo.lock iterate over alarms instead of assuming just one 2018-07-23 13:50:41 +02:00
Cargo.toml bump version 2018-07-23 16:56:52 +02:00
Dockerfile chore: update dependencies (#4) 2018-07-13 12:03:12 +02:00
LICENSE initial commit 2018-05-02 17:17:48 +01:00
README.md Be more explicit on the warning 2018-07-10 17:04:19 +01:00

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