mirror of
https://github.com/saltstack-formulas/smokeping-formula.git
synced 2026-01-08 10:44:03 +01:00
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).
This commit is contained in:
parent
1cfbec0d38
commit
872368f9c7
15
Alerts
Normal file
15
Alerts
Normal file
@ -0,0 +1,15 @@
|
||||
{%- 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 %}
|
||||
9
Probes
Normal file
9
Probes
Normal file
@ -0,0 +1,9 @@
|
||||
{%- from "smokeping/map.jinja" import smokeping with context -%}
|
||||
*** Probes ***
|
||||
|
||||
{% for probe, settings in smokeping.probes.items() %}
|
||||
+ {{ probe }}
|
||||
{% for key, value in settings.items() %}
|
||||
{{ key }} = {{ value }}
|
||||
{% endfor %}
|
||||
{% endfor %}
|
||||
20
Targets
Normal file
20
Targets
Normal file
@ -0,0 +1,20 @@
|
||||
{%- from "smokeping/map.jinja" import smokeping with context -%}
|
||||
{%- set targets = smokeping.targets -%}
|
||||
*** Targets ***
|
||||
|
||||
probe = {{ smokeping.targets.probe }}
|
||||
menu = Top
|
||||
title = {{ smokeping.targets.title }}
|
||||
remark = {{ salt['pillar.get']('smokeping:targets:remark', '') }}
|
||||
alerts = {{ salt['pillar.get']('smokeping:targets:alerts', '') }}
|
||||
|
||||
{% for target, options in smokeping.targets.items() -%}
|
||||
{% if options is mapping() -%}
|
||||
+ {{ target }}
|
||||
|
||||
{% for key, value in options.items() -%}
|
||||
{{ key }} = {{ value }}
|
||||
{% endfor %}
|
||||
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
Loading…
x
Reference in New Issue
Block a user