returns the test hostcheck plugin source
test_hostcheck.pl - host check replacement for testing purposes
./test_hostcheck.pl [ -v ] [ -h ] [ --type=<type> ] [ --minimum-outage=<seconds> ] [ --failchance=<percentage> ] [ --previous-state=<state> ] [ --state-duration=<meconds> ] [ --parent-state=<state> ]
this host check calculates a random based result. It can be used as a testing replacement host check
example monitoring configuration:
defined command { command_name check_host_alive command_line $USER1$/test_hostcheck.pl --failchance=2% --previous-state=$SERVICESTATE$ --state-duration=$SERVICEDURATIONSEC$ }
script has the following arguments
-h
print help and exit
-v
verbose output
--type
can be one of up,down,unreachable,random,flap
./test_hostcheck.pl --minimum-outage=60 --failchance=3% --previous-state=OK --state-duration=2500
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.