mirror of
https://github.com/saltstack-formulas/smokeping-formula.git
synced 2025-01-31 15:55:38 +01:00
65b2c516ec
fix: replace deprecated `iteritems` with `items` * Add files via upload Adjusted *.iteritems() to *.items() which will work for Python 3 aswell as Python 2 (since iteritems is outdated for python3 and breaks the salt-state). * Delete Alerts * Delete Probes * Delete Targets * Update Alerts * Update Probes * Update Targets
16 lines
448 B
Plaintext
16 lines
448 B
Plaintext
{%- from "smokeping/map.jinja" import smokeping with context -%}
|
|
*** Alerts ***
|
|
|
|
to = {{ salt['pillar.get']('smokeping:alerts:to', 'alertee@address.somewhere') }}
|
|
from = {{ salt['pillar.get']('smokeping:alerts:from', 'smokealert@company.xy') }}
|
|
|
|
{% for alert, options in smokeping.alerts.items() -%}
|
|
{% if options is mapping() %}
|
|
+ {{ alert }}
|
|
{% for key, value in options.items() -%}
|
|
{{ key }} = {{ value }}
|
|
{% endfor %}
|
|
|
|
{% endif %}
|
|
{% endfor %}
|