Install Alerta

Install AlertaΒΆ

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:

  1. Log in to the Salt Master node.

  2. Update the system level of your Reclass model.

  3. 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
  4. In the stacklight/client.yml file:

    1. Add the system.docker.swarm.stack.monitoring.alerta class.

    2. Add the following parameters:

  5. In the stacklight/init.yml file, specify the following parameters:

    alerta_admin_password: password
  6. In the stacklight/proxy.yml file, add the following class:

    - system.nginx.server.proxy.monitoring.alerta
  7. Refresh the pillar:

    salt '*' saltutil.refresh_pillar
  8. 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