alertmanager: set log format to json

Signed-off-by: Jakub Sokołowski <jakub@status.im>
This commit is contained in:
Jakub Sokołowski 2022-10-26 03:46:52 +02:00
parent 53ae53b622
commit 63774b1ef2
No known key found for this signature in database
GPG Key ID: 09AA5403E54D9931
2 changed files with 2 additions and 0 deletions

View File

@ -12,6 +12,7 @@ alertmanager_admin_email: ~
alertmanager_cont_tag: 'v0.24.0' alertmanager_cont_tag: 'v0.24.0'
alertmanager_cont_image: 'prom/alertmanager:{{ alertmanager_cont_tag }}' alertmanager_cont_image: 'prom/alertmanager:{{ alertmanager_cont_tag }}'
alertmanager_cont_log_lvl: 'info' alertmanager_cont_log_lvl: 'info'
alertmanager_cont_log_fmt: 'json'
# Port used for the web ui # Port used for the web ui
alertmanager_webui_port: 9093 alertmanager_webui_port: 9093

View File

@ -18,6 +18,7 @@ services:
command: command:
- '--storage.path=/data' - '--storage.path=/data'
- '--config.file=/etc/alertmanager.yml' - '--config.file=/etc/alertmanager.yml'
- '--log.format={{ alertmanager_cont_log_fmt }}'
- '--log.level={{ alertmanager_cont_log_lvl }}' - '--log.level={{ alertmanager_cont_log_lvl }}'
- '--web.external-url={{ alertmanager_url }}' - '--web.external-url={{ alertmanager_url }}'
- '--cluster.advertise-address={{ ansible_local.wireguard.vpn_ip }}:{{ alertmanager_cluster_port }}' - '--cluster.advertise-address={{ ansible_local.wireguard.vpn_ip }}:{{ alertmanager_cluster_port }}'