7.2.10.2.2. Configuration / fichiers utiles

Prometheus alertmanager est optionnel.

7.2.10.2.2.1. Fichier alertmanager.yml

global:
{% if http_proxy_environnement is defined and http_proxy_environnement|length > 0 %}
  http_config:
    proxy_url: '{{ http_proxy_environnement }}'
{% endif %}
  resolve_timeout: 5m

route:
  group_by: ['alertname']
  group_wait: 10s
  group_interval: 10s
  repeat_interval: 1h
{% if prometheus.alertmanager.receivers is defined and prometheus.alertmanager.receivers|length > 0 %}
  receiver: {{ prometheus.alertmanager.receivers.0.name }}
receivers:
{{ prometheus.alertmanager.receivers | to_nice_yaml(width=80, indent=2) }}
{% else %}
  receiver: 'null'
receivers:
- name: 'null'
{% endif %}
inhibit_rules:
  - source_match:
      severity: 'critical'
    target_match:
      severity: 'warning'
    equal: ['alertname', 'dev', 'instance']

7.2.10.2.2.2. Fichier de variable d’environnement

ALERTMANAGER_OPTS='--web.listen-address={{ ip_admin }}:{{ prometheus.alertmanager.api_port | default(9093) }} --cluster.listen-address={{ ip_admin }}:{{ prometheus.alertmanager.cluster_port | default(9094) }} --config.file=/vitam/conf/alertmanager/alertmanager.yml --storage.path=/vitam/data/alertmanager'
# data.retention default 120h
# alerts.gc-interval default 30m
# web.external-url default
# web.external-url
# web.route-prefix default to path of --web.external-url
# more here https://github.com/prometheus/alertmanager/blob/master/cmd/alertmanager/main.go

7.2.10.2.2.3. Fichier de données

Ce service utilise des fichiers de données localisés dans le répertoire /vitam/data/alertmanager/