App::PerlWatcher::Watcher::Ping - Watches for host availablity via pingig it (ICMP) or knoking to it's port (TCP)
version 0.16
# use the following config for Engine: { class => 'App::PerlWatcher::Watcher::Ping', config => { host => 'google.com', frequency => 10, on => { fail => { 5 => 'alert' } }, }, }, # if the port was defined it does TCP-knock to that port. # TCP-knock is required for some hosts, that don't answer to # ICMP echo requests, e.g. notorious microsoft.com :)
The watched host
The watched port. If the port was specified, then the watcher does tcp knock to the port; otherwise it does icmp ping of the host
The frequency of ping. By default it is 60 seconds.
The ping timeout. Default value: 5 seconds
Ivan Baidakou <dmol@gmx.com>
This software is copyright (c) 2013 by Ivan Baidakou.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install App::PerlWatcher::Engine, copy and paste the appropriate command in to your terminal.
cpanm
cpanm App::PerlWatcher::Engine
CPAN shell
perl -MCPAN -e shell install App::PerlWatcher::Engine
For more information on module installation, please visit the detailed CPAN module installation guide.