269 |
$host=$defhost; |
$host=$defhost; |
270 |
$port=$defport; |
$port=$defport; |
271 |
GetOptions( |
GetOptions( |
272 |
"t|timeout=i" => \$timeout, |
"t|timeout=f" => \$timeout, |
273 |
"c|critical=i" => \$timeout, |
"c|critical=f" => \$timeout, |
274 |
"w|warning=i" => \$warning, |
"w|warning=f" => \$warning, |
275 |
"H|host=s" => \$host, |
"H|host=s" => \$host, |
276 |
"p|port=i" => \$port, |
"p|port=i" => \$port, |
277 |
"u|url=s", |
"u|url=s", |
283 |
$help and &usage and exit(0); |
$help and &usage and exit(0); |
284 |
$shorthelp and &shortusage and exit(0); |
$shorthelp and &shortusage and exit(0); |
285 |
$version and &version and exit(0); |
$version and &version and exit(0); |
286 |
|
$timeout=0 if ($timeout<0); |
287 |
|
$warning=0 if ($warning<0); |
288 |
} |
} |
289 |
|
|
290 |
# Exit function: prints nagios status and dumps log |
# Exit function: prints nagios status and dumps log |