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.
juju deploy alertmanager-k8s
juju config alertmanager-k8s \
config_file='@path/to/alertmanager.yml' \
templates_file='@path/to/templates.tmpl'
See config.yaml for the full details.
Use this option to pass your own alertmanager configuration file:
juju deploy alertmanager-k8s --config config_file='@path/to/alertmanager.yml'
or after deployment:
`juju config alertmanager-k8s config_file='@path/to/alertmanager.yml'`
Refer to the official documentation for full details.
Note that the configuration file must not have a templates
section. Instead,
you should use the templates_file
config option.
This is a slight deviation from the official alertmanager config spec.
Use this option to push templates that are being used by the configuration file.
All templates need to go into this single config option, instead of the 'templates' section of the main configuration file. The templates will be pushed to the workload container, and the configuration file will be updated accordingly. Refer to the official documentation for more details on templates.
show-config
: Show alertmanager config file.
HA is achieved by providing each Alertmanager instance at least one IP address of another instance. The cluster would then auto-update with subsequent changes to the cluster.
You may add additional Alertmanager units for high availability
juju add-unit alertmanager-k8s
Scaling alertmanager would automatically cause karma to group alerts by cluster.
The Alertmanager dashboard may be accessed at the default port (9093) on the IP
address of the Alertmanager unit, which is determinable with a juju status
command.
Currently, supported relations are:
- Prometheus, which forwards alerts to
Alertmanager over the
alertmanager_dispatch
interface. Set up withjuju add-relation alertmanager-k8s prometheus-k8s
. - Karma, which displays alerts from all related alertmanager instances
over the
karma_dashboard
interface. Set up withjuju add-relation alertmanager-k8s karma-k8s
.
This charm can be used with the following images:
- Logging, Monitoring, and Alerting (LMA) - a tutorial for running Prometheus, Grafana and Alertmanager with LXD.
- Alertmanager README
- PromCon 2018: Life of an Alert