Alerta is a tool that receives, consolidates, and deduplicates the alerts sent by Alertmanager and visually represents them through a web UI. Alerta provides an overview of the most recent and watched alerts, and enables you to group or filter the alerts according to your needs.
To install Alerta on an existing StackLight LMA deployment:
Log in to the Salt Master node.
Update the system level of your Reclass model.
In the stacklight/server.yml
file, add the following classes:
- system.mongodb.server.cluster
- system.prometheus.alerta
- system.prometheus.alertmanager.notification.alerta
- system.prometheus.server.alert.alerta_relabel
In the stacklight/client.yml
file:
Add the system.docker.swarm.stack.monitoring.alerta
class.
Add the following parameters:
_param:
docker_image_alerta: docker-prod-local.artifactory.mirantis.com/mirantis/external/alerta-web:stable
In the stacklight/init.yml
file, specify the following parameters:
alerta_admin_username: admin@alerta.io
alerta_admin_password: password
In the stacklight/proxy.yml
file, add the following class:
- system.nginx.server.proxy.monitoring.alerta
Refresh the pillar:
salt '*' saltutil.refresh_pillar
Install MongoDB and the Alerta container:
salt -C 'I@mongodb:server' state.sls mongodb.server
sleep 30
salt -C 'I@mongodb:server' state.sls mongodb.cluster
salt -C 'I@prometheus:server' state.sls prometheus -b 1
salt -C 'I@docker:swarm:role:master and I@prometheus:server' state.sls docker
salt -C `I@nginx:server` state.sls nginx