Merge pull request #99 from erickcantwell/MMO-132
[MMO-132] Check the length of the dict, instead of if it's defined (it
diff --git a/linux/meta/sensu.yml b/linux/meta/sensu.yml
index 596538b..b0ee28f 100644
--- a/linux/meta/sensu.yml
+++ b/linux/meta/sensu.yml
@@ -18,7 +18,7 @@
occurrences: 1
subscribers:
- local-linux-system
-{%- if storage.swap is defined %}
+{%- if storage.swap|length > 0 %}
local_linux_storage_swap_usage_{{ system.name|replace('.', '-') }}-{{ system.domain|replace('.', '-') }}:
command: "PATH=$PATH:/usr/lib64/nagios/plugins:/usr/lib/nagios/plugins check_swap -a -w {{ monitoring.swap.warn }} -c {{ monitoring.swap.crit }}"
interval: 60