• By Dylan Stephano-Shachter
Channel Version Revision Published Runs on
latest/stable 36 36 21 Oct 2022
Ubuntu 20.04
latest/candidate 36 36 21 Oct 2022
Ubuntu 20.04
latest/beta 36 36 21 Oct 2022
Ubuntu 20.04
latest/edge 37 37 22 Nov 2022
Ubuntu 20.04
1.0/stable 36 36 21 Oct 2022
Ubuntu 20.04
1.0/candidate 36 36 21 Oct 2022
Ubuntu 20.04
1.0/beta 36 36 21 Oct 2022
Ubuntu 20.04
1.0/edge 36 36 21 Oct 2022
Ubuntu 20.04
juju deploy alertmanager-k8s
Show information


Alertmanager Charmed Operator (k8s)

This Charmed Operator handles instantiation, scaling, configuration, and Day 2 operations specific to Alertmanager.

This operator drives the Alertmanager application, and it can be composed with other operators to deliver a complex application or service, such as COS Lite.

Alertmanager receives alerts from supporting applications, such as Prometheus or Loki, then deduplicates, groups and routes them to the configured receiver(s).

Getting started

Basic deployment

Once you have a controller and model ready, you can deploy alertmanager using the Juju CLI:

juju deploy --channel=beta alertmanager-k8s

The available channels are listed at the top of the page and can also be retrieved with Charmcraft CLI:

charmcraft status alertmanager-k8s
Track    Base                  Channel    Version    Revision    Resources                                                              
latest   ubuntu 20.04 (amd64)  stable     -          -           -                                                                      
                               candidate  -          -           -                                                                      
                               beta       9          9           alertmanager-image (r1)                                                
                               edge       27         27          alertmanager-image (r18)

Once the Charmed Operator is deployed, the status can be checked by running:

juju status --relations --storage --color
Model  Controller  Cloud/Region        Version  SLA          Timestamp
cos    charm-dev   microk8s/localhost  2.9.32   unsupported  13:04:58-03:00

App               Version  Status  Scale  Charm             Channel  Rev  Address        Exposed  Message
alertmanager-k8s           active      1  alertmanager-k8s  beta       9  no       

Unit                 Workload  Agent  Address      Ports  Message
alertmanager-k8s/0*  active    idle         

Relation provider          Requirer                   Interface             Type  Message
alertmanager-k8s:replicas  alertmanager-k8s:replicas  alertmanager_replica  peer  

Storage Unit        Storage ID  Type        Pool        Mountpoint                    Size    Status    Message
alertmanager-k8s/0  data/0      filesystem  kubernetes  /var/lib/juju/storage/data/0  1.0GiB  attached  Successfully provisioned volume pvc-152fd112-aa86-471d-a937-8aefe6799f04

Dashboard and HTTP API

The Alertmanager dashboard and HTTP API can be accessed at the default port (9093) on the Alertmanager IP address, which is determinable with a juju status command.

To obtain the load-balanaced application IP,

juju status alertmanager-k8s --format=json \
  | jq -r '.applications."alertmanager-k8s".address'

Similarly, to obtain an individual unit’s IP address:

juju status alertmanager-k8s --format=json \
  | jq -r '.applications."alertmanager-k8s".units."alertmanager-k8s/0".address'

So, if you navigate to these IPs you will get Alertmanager dashboard:

OCI Images

This charm is published on Charmhub with alertmanager images from ubuntu/prometheus-alertmanager, however, it should also work with the official

To try the charm with a different image you can use juju refresh. For example:

juju refresh alertmanager-k8s \

(Note: currently, refreshing to a different image only works when deploying from a local charm - lp/1954462.)

Resource revisions

Workload images are archived on charmhub by revision number.

Resource Revision Image
alertmanager-image r1 0.21-20.04_beta

You can use charmcraft to see the mapping between charm revisions and resource revisions:

charmcraft status alertmanager-k8s

Official alertmanager documentation

For further details about Alertmanager configuration and usage, please refer to the official Alertmanager documentation.

Additional Information

Help us improve this documentation

Most of this documentation can be collaboratively discussed and changed on the respective topic in the doc category of the Charmhub forum. See the documentation guidelines if you’d like to contribute.

Last updated 3 months ago. Help improve this document in the forum.