Created a custom check
Posted: Tue Sep 03, 2013 8:44 am
I have created a custom check for an application, and it is returning the correct info as expected but Im not getting the performance data to graph the output! included is the script named test3 and the results. Im looking for help to help get the perfromance data working correctly
#!/usr/bin/perl
use strict;
use warnings;
my $HOSTNAME = $ARGV[0];
my $EWUsers=`wget "http://XXXX.XXXX.com/adminportal/utilit ... XXXXXX.com" -q -O - |grep Users |cut -d ":" -f 2 |tr -d " "`;
if ($EWUsers < "200") {
print "OK - $EWUsers";
exit(0);}
if ($EWUsers < "210") {
print "WARNING - $EWUsers";
exit(1);}
if ($EWUsers >= "210") {
print "CRITICAL - $EWUsers";
exit(2);}
print "UNKNOWN|$EWUsers";
exit(3);
output
OK - 72
#!/usr/bin/perl
use strict;
use warnings;
my $HOSTNAME = $ARGV[0];
my $EWUsers=`wget "http://XXXX.XXXX.com/adminportal/utilit ... XXXXXX.com" -q -O - |grep Users |cut -d ":" -f 2 |tr -d " "`;
if ($EWUsers < "200") {
print "OK - $EWUsers";
exit(0);}
if ($EWUsers < "210") {
print "WARNING - $EWUsers";
exit(1);}
if ($EWUsers >= "210") {
print "CRITICAL - $EWUsers";
exit(2);}
print "UNKNOWN|$EWUsers";
exit(3);
output
OK - 72