returns the test servicecheck plugin source
test_servicecheck.pl - service check replacement for testing purposes
./test_servicecheck.pl [ -v ] [ -h ] [ --type=<type> ] [ --minimum-outage=<seconds> ] [ --failchance=<percentage> ] [ --previous-state=<state> ] [ --state-duration=<meconds> ] [ --total-critical-on-host=<nr> ] [ --total-warning-on-host=<nr> ]
this service check calculates a random based result. It can be used as a testing replacement service check
example configuration:
defined command { command_name check_service command_line $USER1$/test_servicecheck.pl --failchance=2% --previous-state=$SERVICESTATE$ --state-duration=$SERVICEDURATIONSEC$ --total-critical-on-host=$TOTALHOSTSERVICESCRITICAL$ --total-warning-on-host=$TOTALHOSTSERVICESWARNING$ }
script has the following arguments
-h
print help and exit
-v
verbose output
--type
can be one of ok,warning,critical,unknown,random,flap
./test_servicecheck.pl --minimum-outage=60 --failchance=3% --previous-state=OK --state-duration=2500 --total-critical-on-host=0 --total-warning-on-host=0
2009, Sven Nierlein, <nierlein@cpan.org>
To install Monitoring::Generator::TestConfig, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Monitoring::Generator::TestConfig
CPAN shell
perl -MCPAN -e shell install Monitoring::Generator::TestConfig
For more information on module installation, please visit the detailed CPAN module installation guide.