diff options
author | Gaëtan Duchaussois <gaetan.duchaussois@fretlink.com> | 2021-04-28 16:49:16 +0200 |
---|---|---|
committer | Gaëtan Duchaussois <gaetan.duchaussois@fretlink.com> | 2021-04-28 17:01:14 +0200 |
commit | 8916f8fa2167abad24cfdd2a9e305160d83a6958 (patch) | |
tree | 4ca417c914c3a84cd6ddeb30158a7ae4746ddb54 /templates/netdata_alarm.conf.j2 | |
parent | 0b423e4532da6a8e65b0cc5de00fe786c82d5013 (diff) | |
download | ansible-netdata_straight-8916f8fa2167abad24cfdd2a9e305160d83a6958.tar.gz ansible-netdata_straight-8916f8fa2167abad24cfdd2a9e305160d83a6958.tar.zst ansible-netdata_straight-8916f8fa2167abad24cfdd2a9e305160d83a6958.zip |
feature: add sensor configuration
Diffstat (limited to 'templates/netdata_alarm.conf.j2')
-rw-r--r-- | templates/netdata_alarm.conf.j2 | 21 |
1 files changed, 21 insertions, 0 deletions
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 %} | ||