NAME

App::PerlWatcher::Watcher::Ping - Watches for host availablity via pingig it (ICMP) or knoking to it's port (TCP)

VERSION

version 0.20

SYNOPSIS

# 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 :)

ATTRIBUTES

host

The watched host

port

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

frequency

The frequency of ping. By default it is 60 seconds.

timeout

The ping timeout. Default value: 5 seconds

AUTHOR

Ivan Baidakou <dmol@gmx.com>

COPYRIGHT AND LICENSE

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.