diff options
author | Christian Pointner <equinox@spreadspace.org> | 2022-03-09 23:25:28 +0100 |
---|---|---|
committer | Christian Pointner <equinox@spreadspace.org> | 2022-03-09 23:25:28 +0100 |
commit | e9cad366c80a621542f57bcb9b8708b43296819b (patch) | |
tree | eb7c034e25a284d1388479f6955425772cd7d67b /inventory/host_vars | |
parent | ch-ap: switch to WPA2 only (diff) | |
parent | prometheus/alerta: tune some severities (diff) |
Merge branch 'experiment/alerta'
Diffstat (limited to 'inventory/host_vars')
-rw-r--r-- | inventory/host_vars/ch-apps.yml | 3 | ||||
-rw-r--r-- | inventory/host_vars/ch-mon.yml | 26 | ||||
-rw-r--r-- | inventory/host_vars/ele-mon.yml | 4 |
3 files changed, 29 insertions, 4 deletions
diff --git a/inventory/host_vars/ch-apps.yml b/inventory/host_vars/ch-apps.yml index bdbac832..ed2aeb70 100644 --- a/inventory/host_vars/ch-apps.yml +++ b/inventory/host_vars/ch-apps.yml @@ -113,3 +113,6 @@ kubernetes_version: 1.23.2 kubernetes_container_runtime: docker kubernetes_standalone_max_pods: 42 kubernetes_standalone_cni_variant: with-portmap + + +alerta_base_path: /srv/storage/alerta diff --git a/inventory/host_vars/ch-mon.yml b/inventory/host_vars/ch-mon.yml index 0c27a522..684cc722 100644 --- a/inventory/host_vars/ch-mon.yml +++ b/inventory/host_vars/ch-mon.yml @@ -61,6 +61,10 @@ prometheus_server_storage: size: 30G fs: ext4 +prometheus_server_external_labels: + environment: chaos-at-home + monitor: "{{ inventory_hostname }}" + prometheus_server_alertmanager: url: "127.0.0.1:9093" path_prefix: "/alertmanager/" @@ -68,7 +72,7 @@ prometheus_server_alertmanager: username: server password: "{{ vault_prometheus_alertmanager_auth_user_passwords['server'] }}" -prometheus_server_web_external_url: /prometheus/ +prometheus_server_web_external_url: "http://{{ network.primary.address | ipaddr('address') }}/prometheus/" prometheus_server_auth_users: server: "{{ vault_prometheus_server_auth_user_passwords['server'] }}" @@ -136,11 +140,29 @@ prometheus_alertmanager_smtp: from: "noreply@chaos-at-home.org" require_tls: no -prometheus_alertmanager_web_route_prefix: /alertmanager/ +prometheus_alertmanager_web_external_url: "http://{{ network.primary.address | ipaddr('address') }}/alertmanager/" prometheus_alertmanager_auth_users: server: "{{ vault_prometheus_alertmanager_auth_user_passwords['server'] }}" admin: "{{ vault_prometheus_alertmanager_auth_user_passwords['admin'] }}" + alerta: "alerta" ## TODO: move this to vault + +prometheus_alertmanager_route: + receiver: alerta + group_by: ['...'] + group_wait: 0 + group_interval: 10s + repeat_interval: 5m + +prometheus_alertmanager_receivers: + - name: alerta + webhook_configs: + - url: http://192.168.32.1:8080/api/webhooks/prometheus + send_resolved: true + http_config: + basic_auth: + username: admin + password: alerta ## TODO: move this to vault grafana_secret_key: "{{ vault_grafana_secret_key }}" diff --git a/inventory/host_vars/ele-mon.yml b/inventory/host_vars/ele-mon.yml index 4ad37bce..5d03837c 100644 --- a/inventory/host_vars/ele-mon.yml +++ b/inventory/host_vars/ele-mon.yml @@ -70,7 +70,7 @@ prometheus_server_alertmanager: url: "127.0.0.1:9093" path_prefix: "/alertmanager/" -prometheus_server_web_external_url: /prometheus/ +prometheus_server_web_external_url: "http://{{ network.primary.address | ipaddr('address') }}/prometheus/" prometheus_exporters_extra: @@ -101,7 +101,7 @@ prometheus_exporter_mikrotik_devices: user: prometheus password: "{{ vault_prometheus_exporter_mikrotik_api_password }}" -prometheus_alertmanager_web_route_prefix: /alertmanager/ +prometheus_alertmanager_web_external_url: "http://{{ network.primary.address | ipaddr('address') }}/alertmanager/" prometheus_alertmanager_smtp: smarthost: "mailrelay.chaos-at-home.org:587" from: "noreply@elev8.at" |