From 8916f8fa2167abad24cfdd2a9e305160d83a6958 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ga=C3=ABtan=20Duchaussois?= Date: Wed, 28 Apr 2021 16:49:16 +0200 Subject: feature: add sensor configuration --- templates/netdata_alarm.conf.j2 | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 templates/netdata_alarm.conf.j2 (limited to 'templates/netdata_alarm.conf.j2') 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 @@ +{% for alarm in collector.alarm_config %} +{% if alarm.template is defined -%} +template: {{ alarm.template }} +families: {{ alarm.families | default("*") }} +{% else %} + alarm: {{ alarm.alarm | default( collector.name ) }} +{% endif %} + on: {{ alarm.on_what }} + os: {{ alarm.os | default("*") }} + hosts: {{ alarm.os | default("*") }} + lookup: {{ alarm.lookup }} +{% if alarm.calc is defined %} + calc: {{ alarm.calc }} +{% endif %} + every: {{ alarm.every | default("1m") }} + warn: {{ alarm.warn | default("$status == $WARNING") }} + crit: {{ alarm.crit | default("$status == $CRITICAL") }} + delay: {{ alarm.delay | default("up 0 down 0 multiplier 1.0 max 0") }} + to: {{ alarm.to | default("silent") }} + +{% endfor %} -- cgit v1.2.3