CubicrootXYZ / alertmanager_gotify_bridge

A bridge between Prometheus AlertManager and a Gotify server

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Alertmanager to Gotify webhook bridge

An Alertmanager-aware webhook endpoint that converts messages to Gotify API calls.

Typically, this should have been created as a Gotify Plugin... but after much trial and error, the plugin system never could build properly. I also prefer the idea of separating the translation layer from needing to be built on the exact version of the running Gotify server.

Installation

Binaries

Download the already existing binaries for your platform:

$ ./alertmanager_gotify_bridge <flags>

From source

Using the standard go install (you must have Go already installed in your local machine):

$ go install github.com/DRuggeri/alertmanager_gotify_bridge
$ alertmanager_gotify_bridge <flags>

Usage

NOTE: All parameters may be set as environment entries as well as provided on the command line. The environment entry is the same as the flag but converted to all capital letters.

For example, the environment entry for gotify_token may be set as GOTIFY_TOKEN

Flags

usage: alertmanager_gotify_bridge [<flags>]

Flags:
  --help                       Show context-sensitive help (also try --help-long and --help-man).
  --gotify_endpoint="http://127.0.0.1:80/message"
                               Full path to the Gotify messages endpoint
  --bind_address=0.0.0.0       The address the bridge will listen on
  --port=8080                  The port the bridge will listen on
  --webhook_path="/gotify_webhook"
                               The URL path to handle requests on
  --timeout=5s                 The number of seconds to wait when connecting to gotify
  --title_annotation="description"
                               Annotation holding the title of the alert
  --message_annotation="summary"
                               Annotation holding the alert message
  --priority_annotation="priority"
                               Annotation holding the priority of the alert
  --default_priority=5         Annotation holding the priority of the alert
  --debug                      Enable debug output of the server
  --version                    Show application version.
  --extended_details           When enabled, alerts are presented in HTML format and include colorized status (FIR|RES), alert start time, and a link to the generator of the alert.

Community Contributions

About

A bridge between Prometheus AlertManager and a Gotify server

License:Apache License 2.0


Languages

Language:Go 60.4%Language:Shell 39.6%