Permalink
Browse files

Merge pull request #127 from sbraz/optparse

Use complete option arguments for compatibility with rrdtool 1.6.0
  • Loading branch information...
lingej committed Apr 25, 2016
2 parents 02c541f + 0a539e1 commit a2a82ae160b316b13f7a415e467533f2afc54220
@@ -4,7 +4,7 @@
# Template for check_dns
#
$opt[1] = "--lower=$MIN[1] --vertical-label $UNIT[1] --title \"DNS Response Time\" ";
$opt[1] = "--lower-limit=$MIN[1] --vertical-label $UNIT[1] --title \"DNS Response Time\" ";
$def[1] = "DEF:var1=$RRDFILE[1]:$DS[1]:AVERAGE " ;
@@ -4,7 +4,7 @@
# Template for check_multi
#
$opt[1] = "--lower=$MIN[1] --vertical-label num --title \"Number of Checks\" ";
$opt[1] = "--lower-limit=$MIN[1] --vertical-label num --title \"Number of Checks\" ";
$ds_name[1] = "Executed Plugins";
$def[1] = "DEF:var1=$RRDFILE[1]:$DS[1]:AVERAGE " ;
@@ -6,7 +6,7 @@
# RTA
#
$ds_name[1] = "Round Trip Times";
$opt[1] = "--lower=0 --vertical-label \"RTA\" --title \"Ping times\" ";
$opt[1] = "--lower-limit=0 --vertical-label \"RTA\" --title \"Ping times\" ";
$opt[1] .= rrd::darkteint();
$def[1] = rrd::def("var1", $RRDFILE[1], $DS[1], "AVERAGE") ;
$def[1] .= rrd::ticker("var1", $WARN[1], $CRIT[1]) ;
@@ -4,7 +4,7 @@
# Template for check_users
#
$opt[1] = "--lower=$MIN[1] --vertical-label \"Users\" --title \"Users\" ";
$opt[1] = "--lower-limit=$MIN[1] --vertical-label \"Users\" --title \"Users\" ";
$def[1] = "DEF:var1=$RRDFILE[1]:$DS[1]:MAX " ;
@@ -47,16 +47,16 @@
$crit_min = $VAL['CRIT_MIN'];
}
if ( $VAL['MIN'] != "" && is_numeric($VAL['MIN']) ) {
$lower = " --lower=" . $VAL['MIN'];
$lower = " --lower-limit=" . $VAL['MIN'];
$minimum = $VAL['MIN'];
}
if ( $VAL['MAX'] != "" && is_numeric($VAL['MAX']) ) {
$maximum = $VAL['MAX'];
}
if ($VAL['UNIT'] == "%%") {
$vlabel = "%";
$upper = " --upper=101 ";
$lower = " --lower=0 ";
$upper = " --upper-limit=101 ";
$lower = " --lower-limit=0 ";
}
else {
$vlabel = $VAL['UNIT'];

0 comments on commit a2a82ae

Please sign in to comment.