diff options
author | Gaƫtan <36162164+gaetanfl@users.noreply.github.com> | 2021-11-03 10:33:24 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-11-03 10:33:24 +0100 |
commit | 9f55450f44645d9479bdbb2b9209c566f26e4d10 (patch) | |
tree | 80131ed79f1b6233db736dfc223d7dfa2de73207 /templates | |
parent | d533407af1f4e5d55bb778fabf4b9b0d9bb1ed56 (diff) | |
parent | ffadb834d15c8bff62cb4133d5b5156e5dfef55b (diff) | |
download | ansible-netdata_straight-9f55450f44645d9479bdbb2b9209c566f26e4d10.tar.gz ansible-netdata_straight-9f55450f44645d9479bdbb2b9209c566f26e4d10.tar.zst ansible-netdata_straight-9f55450f44645d9479bdbb2b9209c566f26e4d10.zip |
Merge pull request #2 from fretlink/add_config
Add configuration for sensors
Diffstat (limited to 'templates')
-rw-r--r-- | templates/health_template.j2 | 6 | ||||
-rw-r--r-- | templates/netdata_alarm.conf.j2 | 21 |
2 files changed, 27 insertions, 0 deletions
diff --git a/templates/health_template.j2 b/templates/health_template.j2 new file mode 100644 index 0000000..2e67b96 --- /dev/null +++ b/templates/health_template.j2 | |||
@@ -0,0 +1,6 @@ | |||
1 | {% for template in collector.health_config %} | ||
2 | template = {{ template.name }} | ||
3 | {% for config in template.definition %} | ||
4 | {{ config }} | ||
5 | {% endfor %} | ||
6 | {% endfor %} | ||
diff --git a/templates/netdata_alarm.conf.j2 b/templates/netdata_alarm.conf.j2 new file mode 100644 index 0000000..c689a95 --- /dev/null +++ b/templates/netdata_alarm.conf.j2 | |||
@@ -0,0 +1,21 @@ | |||
1 | {% for alarm in collector.alarm_config %} | ||
2 | {% if alarm.template is defined -%} | ||
3 | template: {{ alarm.template }} | ||
4 | families: {{ alarm.families | default("*") }} | ||
5 | {% else %} | ||
6 | alarm: {{ alarm.alarm | default( collector.name ) }} | ||
7 | {% endif %} | ||
8 | on: {{ alarm.on_what }} | ||
9 | os: {{ alarm.os | default("*") }} | ||
10 | hosts: {{ alarm.os | default("*") }} | ||
11 | lookup: {{ alarm.lookup }} | ||
12 | {% if alarm.calc is defined %} | ||
13 | calc: {{ alarm.calc }} | ||
14 | {% endif %} | ||
15 | every: {{ alarm.every | default("1m") }} | ||
16 | warn: {{ alarm.warn | default("$status == $WARNING") }} | ||
17 | crit: {{ alarm.crit | default("$status == $CRITICAL") }} | ||
18 | delay: {{ alarm.delay | default("up 0 down 0 multiplier 1.0 max 0") }} | ||
19 | to: {{ alarm.to | default("silent") }} | ||
20 | |||
21 | {% endfor %} | ||