This repository has been archived by the owner on Mar 6, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 95
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
New alertmanager upstream release and template improvements (#62)
[patch]
- Loading branch information
1 parent
d2d12a3
commit 857a5e5
Showing
5 changed files
with
26 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,50 +1,50 @@ | ||
{{ ansible_managed | comment }} | ||
|
||
global: | ||
resolve_timeout: {{ alertmanager_resolve_timeout }} | ||
resolve_timeout: {{ alertmanager_resolve_timeout | quote}} | ||
{% for key, value in alertmanager_smtp.items() %} | ||
smtp_{{ key }}: {{ value }} | ||
smtp_{{ key }}: {{ value | quote }} | ||
{% endfor %} | ||
{% if alertmanager_slack_api_url != '' %} | ||
slack_api_url: {{ alertmanager_slack_api_url }} | ||
{% if alertmanager_slack_api_url | length %} | ||
slack_api_url: {{ alertmanager_slack_api_url | quote }} | ||
{% endif %} | ||
{% if alertmanager_pagerduty_url != '' %} | ||
pagerduty_url: {{ alertmanager_pagerduty_url }} | ||
{% if alertmanager_pagerduty_url | length %} | ||
pagerduty_url: {{ alertmanager_pagerduty_url | quote }} | ||
{% endif %} | ||
{% if alertmanager_opsgenie_api_key != '' %} | ||
opsgenie_api_key: {{ alertmanager_opsgenie_api_key }} | ||
{% if alertmanager_opsgenie_api_key | length %} | ||
opsgenie_api_key: {{ alertmanager_opsgenie_api_key | quote }} | ||
{% endif %} | ||
{% if alertmanager_opsgenie_api_url != '' %} | ||
opsgenie_api_url: {{ alertmanager_opsgenie_api_url }} | ||
{% if alertmanager_opsgenie_api_url | length %} | ||
opsgenie_api_url: {{ alertmanager_opsgenie_api_url | quote }} | ||
{% endif %} | ||
{% if alertmanager_hipchat_api_url != '' %} | ||
hipchat_api_url: {{ alertmanager_hipchat_api_url }} | ||
{% if alertmanager_hipchat_api_url | length %} | ||
hipchat_api_url: {{ alertmanager_hipchat_api_url | quote }} | ||
{% endif %} | ||
{% if alertmanager_hipchat_auth_token != '' %} | ||
hipchat_auth_token: {{ alertmanager_hipchat_auth_token }} | ||
{% if alertmanager_hipchat_auth_token | length %} | ||
hipchat_auth_token: {{ alertmanager_hipchat_auth_token | quote }} | ||
{% endif %} | ||
{% if alertmanager_wechat_url != '' %} | ||
wechat_api_url: {{ alertmanager_wechat_url }} | ||
{% if alertmanager_wechat_url | length %} | ||
wechat_api_url: {{ alertmanager_wechat_url | quote }} | ||
{% endif %} | ||
{% if alertmanager_wechat_secret != '' %} | ||
wechat_api_secret: {{ alertmanager_wechat_secret }} | ||
{% if alertmanager_wechat_secret | length %} | ||
wechat_api_secret: {{ alertmanager_wechat_secret | quote }} | ||
{% endif %} | ||
{% if alertmanager_wechat_corp_id != '' %} | ||
wechat_api_corp_id: {{ alertmanager_wechat_corp_id }} | ||
{% if alertmanager_wechat_corp_id | length %} | ||
wechat_api_corp_id: {{ alertmanager_wechat_corp_id | quote }} | ||
{% endif %} | ||
templates: | ||
- '/etc/alertmanager/templates/*.tmpl' | ||
{% if alertmanager_receivers != [] %} | ||
{% if alertmanager_receivers | length %} | ||
receivers: | ||
{{ alertmanager_receivers | to_nice_yaml(indent=2) }} | ||
{% endif %} | ||
{% if alertmanager_inhibit_rules != [] %} | ||
{% if alertmanager_inhibit_rules | length %} | ||
inhibit_rules: | ||
{{ alertmanager_inhibit_rules | to_nice_yaml(indent=2) }} | ||
{% endif %} | ||
route: | ||
{{ alertmanager_route | to_nice_yaml(indent=2) | indent(2, False) }} | ||
{% if alertmanager_child_routes != [] %} | ||
{% if alertmanager_child_routes | length %} | ||
routes: | ||
{{ alertmanager_child_routes | to_nice_yaml(indent=2) | indent(2, False) }} | ||
{% endif %} |