Alertmanager

juju deploy cs:alertmanager
Show information
Channel Version Platform
latest/stable 1
Kubernetes
latest/candidate 1
Kubernetes
latest/beta 1
Kubernetes
latest/edge 1
Kubernetes

Platform:

About

Alert management for charmed LMA stack Read more


Discuss this charm

Share your thoughts on this charm with the community on discourse.

Join the discussion

Alertmanager Operator

Description

The Alertmanager operator provides an alerting solution for the Prometheus Operator. It is part of an Observability stack in the Juju charm ecosystem. Alertmanager accepts alerts from Prometheus, then deduplicates, groups and routes them to the selected receiver, based on a set of alerting rules. These alerting rules may be set by any supported charm that uses the services of Prometheus by forming a relation with it.

Setup

A typical setup using snaps, for deployments to a microk8s cluster can be done using the following commands

sudo snap install microk8s --classic
microk8s.enable dns storage registry dashboard
sudo snap install juju --classic
juju bootstrap microk8s microk8s
juju create-storage-pool operator-storage kubernetes storage-class=microk8s-hostpath

Build

Install the charmcraft tool

sudo snap install charmcraft

Build the charm in this git repository using

charmcraft build

Usage

Create a Juju model (say "lma") for your observability operators

juju add-model lma

First deploy Prometheus following instructions from the its repository. You may also deploy Prometheus using Charmhub

Now deploy the Alertmanger charm you just built. Alertmanager may support mulitple alert receivers (see below). In order to use any of these receivers relavent configuration information is required at deployment or subsequently. Without any configured receiver Alertmanager will enter a blocked state.

Deploy Alertmanager with PagerDuty configuration
juju deploy ./alertmanager.charm --config pagerduty_key='your-key'

Alternatively you may just deploy Alertmanger and let it enter the blocked state as in

juju deploy ./alertmanager.charm

Subsequently you can then specify the receiver configuration as in

juju config alertmanager pagerduty_key='your-key'

This should unblock Alertmanager.

Finally add a relation between Prometheus and Alertmanager.

juju add-relation prometheus alertmanager
Scale Out Usage

You may add additional Alertmanager units for high availability

juju add-unit alertmanager

Relations

Currently supported relations are

Receivers

Currently supported receivers are

Developing

Use your existing Python 3 development environment or create and activate a Python 3 virtualenv

virtualenv -p python3 venv
source venv/bin/activate

Install the development requirements

pip install -r requirements-dev.txt

Testing

Just run run_tests:

./run_tests