Leon-Africa / avail-node-deployer

Multi-cloud automated deployment for an avail full node.
Mozilla Public License 2.0
0 stars 0 forks source link

Add configuration for alert manager #1

Open Leon-Africa opened 4 weeks ago

Leon-Africa commented 4 weeks ago

Leveraging existing alerts alert manager can be setup and configured

Leon-Africa commented 4 weeks ago

The installation needs to be added to the playbook and a sample config can be done:

global:
  resolve_timeout: 5m

route:
  group_by: ['alertname']
  group_wait: 30s
  group_interval: 5m
  repeat_interval: 3h
  receiver: 'default'

receivers:
  - name: 'default'
    email_configs:
      - to: 'your_email@example.com'
        from: 'alertmanager@example.com'
        smarthost: 'smtp.example.com:587'
        auth_username: 'smtp_user'
        auth_password: 'smtp_password'
        auth_identity: 'alertmanager@example.com'

inhibit_rules:
  - source_match:
      severity: 'critical'
    target_match:
      severity: 'warning'
    equal: ['alertname', 'instance']

In such a case the user would need to be prompted to enter the email somewhere at the start of the setup i.e in the automation script.

A simpler way to manage it may be to include it as a group var which may be a more natural approach seeing that the name is being set that way at the moment.