Data::Checker::Ping - check data to see if it contains hosts that respong to pings
use Data::Checker; $obj = new Data::Checker; $obj->check($data,"Ping",$check_opts);
This module is meant to be used by the Data::Checker module.
One set of checks that is often done on sets of hosts is to check that they respond to pings. This module provides several ping related checks that can be performed.
This is the only function provided by this module, and it is intended to be used by the Data::Checker module.
The $check_opts hashref defines exactly what ping checks to perform, and some options used by those checks. Known keys that specify the checks are:
These specify what protocol to use for sending a ping. The default is to use tcp. Refer to the Net::Ping manual for information about each.
The following keys can also be present to specify additional options:
This is the timeout to use for a given check.
All examples include the following lines:
use Data::Checker; $obj = new Data::Checker; $data = ... $opts = ... ($pass,$fail,$info,$warn) = $obj->check($data,"Ping",$opts);
The value of $data and $opts is listed below in the examples.
$data
$opts
$data = [ 'cpan.org', 'aaa.bbb.ccc' ]; $opts = { 'external' => undef };
Produces:
$pass = [ 'cpan.org' ] $fail = {'aaa.bbb.ccc' => ['Host does not respond to external pings']};
None known.
Data::Checker, Net::Ping
This script is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
Sullivan Beck (sbeck@cpan.org)
To install Data::Checker, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Data::Checker
CPAN shell
perl -MCPAN -e shell install Data::Checker
For more information on module installation, please visit the detailed CPAN module installation guide.