alertmanager-maintenance-scheduler

command module
v0.0.0-...-586b792 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 9, 2020 License: Apache-2.0 Imports: 22 Imported by: 0

README

alertmanager-maintenance-scheduler

A maintenance scheduler UI for Prometheus AlertManager

The project in its current status is meant to support a specific feature around the Alertmanager API, and that is to be able to schedule a finite number of repeating silences. The tool is intended to be used via its Web based UI.

Getting Started

Prerequisites

To run this project, you will need a working Go environment.

Installing
go get -u github.com/FXinnovation/alertmanager-maintenance-scheduler
Building

To build simply run:

make build

Run the binary

The tool expects a config file as one of its arguments:

./alertmanager-maintenance-scheduler --config.file=/path/to/config.yml

The Alertmanager API connection can also be configured by defining the following environment variable(s). If they are present, they will take precedence over the corresponding variables in the config file.

Environment Variable Description
ALERTMANAGER_URL URL of Alertmanager (eg: "http://localhost:9093/")

Use -h flag to list available options.

Configuration

An example can be found in sample-config.yml.

Configuration element Description
alertmanager_url (Mandatory) URL of Alertmanager (eg: "http://localhost:9093/")

Docker image

You can run images published in dockerhub.

You can also build a docker image using:

make docker

The resulting image is named fxinnovation/alertmanager-maintenance-scheduler:<git-branch>.

The image exposes port 8080 and expects a config in /opt/alertmanager-maintenance-scheduler/config.yml. To configure it, you can pass the environment variables, and bind-mount a config from your host:

docker run -p 8080:8080 -v /path/on/host/config/config.yml:/opt/alertmanager-maintenance-scheduler/config/config.yml -e ALERTMANAGER_URL="http://localhost:9093/" fxinnovation/alertmanager-maintenance-scheduler:<git-branch>

Testing

Running unit tests
make test

Contributing

Refer to CONTRIBUTING.md.

License

Apache License 2.0, see LICENSE.

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL