2020-12-07 11:20:33 +00:00
|
|
|
---
|
|
|
|
- name: Create Consul service definition
|
2024-05-14 08:25:02 +00:00
|
|
|
include_role: name=infra-role-consul-service
|
2020-12-07 11:20:33 +00:00
|
|
|
vars:
|
2020-12-07 12:11:09 +00:00
|
|
|
consul_config_name: '{{ alertmanager_service_name }}'
|
2020-12-07 11:20:33 +00:00
|
|
|
consul_services:
|
2020-12-07 12:11:09 +00:00
|
|
|
- name: '{{ alertmanager_service_name }}'
|
2020-12-07 11:20:33 +00:00
|
|
|
tags: ['metrics', 'alertmanager']
|
|
|
|
port: '{{ alertmanager_webui_port }}'
|
2021-05-19 21:00:33 +00:00
|
|
|
address: '{{ ansible_local.wireguard.vpn_ip }}'
|
2020-12-07 11:20:33 +00:00
|
|
|
checks:
|
2022-05-13 19:57:44 +00:00
|
|
|
- id: '{{ alertmanager_service_name }}-health'
|
|
|
|
name: 'Alert Manager Health'
|
|
|
|
type: 'http'
|
2020-12-07 11:20:33 +00:00
|
|
|
http: 'http://localhost:{{ alertmanager_webui_port }}/api/v1/receivers'
|
|
|
|
|
|
|
|
# We need to do this for discover step to work
|
|
|
|
- name: Reload Consul right away
|
2022-02-18 10:20:40 +00:00
|
|
|
systemd:
|
|
|
|
name: 'consul'
|
|
|
|
state: 'reloaded'
|