Module: check_mk
Branch: master
Commit: a6110ad86c4574eae46495292afd7319952be1de
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=a6110ad86c4574…
Author: Andreas Boesl <ab(a)mathias-kettner.de>
Date: Fri Sep 20 13:16:07 2013 +0200
pnp-templates: fixed warn/crit levels for etherbox humidity
---
pnp-templates/check_mk-etherbox.humidity.php | 14 +++++++++-----
1 file changed, 9 insertions(+), 5 deletions(-)
diff --git a/pnp-templates/check_mk-etherbox.humidity.php
b/pnp-templates/check_mk-etherbox.humidity.php
index 1c32729..9d35399 100644
--- a/pnp-templates/check_mk-etherbox.humidity.php
+++ b/pnp-templates/check_mk-etherbox.humidity.php
@@ -29,7 +29,7 @@
# | Michael Nieporte <Michael.Nieporte(a)uk-essen.de> |
# +------------------------------------------------------------------+
-$opt[1] = "--vertical-label \"Percent\" --title \"$servicedesc\"
";
+$opt[1] = "--vertical-label \"Percent\" -l 0 -u 100 --title
\"$servicedesc\" ";
$def[1] = "DEF:var1=$RRDFILE[1]:$DS[1]:MAX ";
$def[1] .= "LINE2:var1#2080ff:\"Humidity\:\" ";
@@ -37,8 +37,12 @@ $def[1] .= "GPRINT:var1:LAST:\"%2.0lf%%\" ";
$def[1] .= "GPRINT:var1:AVERAGE:\"(Avg\: %2.0lf%%,\" ";
$def[1] .= "GPRINT:var1:MIN:\"Min\: %2.0lf%%,\" ";
$def[1] .= "GPRINT:var1:MAX:\"Max\: %2.0lf%%)\" ";
-$def[1] .= "HRULE:$CRIT[1]#FFFF00 ";
-$def[1] .= "HRULE:$WARN[1]#FF0000 ";
-$def[1] .= "HRULE:$MIN[1]#FFFF00 ";
-$def[1] .= "HRULE:$MAX[1]#FF0000 ";
+if($CRIT[1])
+ $def[1] .= "HRULE:$CRIT[1]#FFFF00 ";
+if($WARN[1])
+ $def[1] .= "HRULE:$WARN[1]#FF0000 ";
+if($MIN[1])
+ $def[1] .= "HRULE:$MIN[1]#FFFF00 ";
+if($MAX[1])
+ $def[1] .= "HRULE:$MAX[1]#FF0000 ";
?>