juju deploy alertmanager-k8s
|latest/stable||1||1||03 May 2021|
|latest/edge||6||6||15 Sep 2021|
Alert management for charmed LMA stack Read more
Discuss this charm
Share your thoughts on this charm with the community on discourse.
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.
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
Install the charmcraft tool
sudo snap install charmcraft
Build the charm in this git repository using
Create a Juju model (say "lma") for your observability operators
juju add-model lma
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
Currently supported relations are
Currently supported receivers are
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