icmpmonitor - multiple host monitoring tool
icmpmonitor [-f cfg file] [-d] [-v] [-r]
The icmpmonitor Using the InterNet Control Message Protocol (ICMP)
"ECHO" facility, monitors several hosts, and notify admin if some of
them are down.
icmpmonitor accepts following options:
- -d
- if specified, the program will detach itself from control terminal and
work in 'daemon' mode. All error messages will go to syslog.
- -f <configuration file>
- Name of configuration file.
- -v
- if specified, the program will produce more log messages describing its
activity.
- -r
- Execute DOWN command repeatedly until host will be up again. If it is not
specified, the command is excuted only once.
You need to create the configuration file. You can find a sample one in the
distribution named 'sample.cfg'. The file consists of one or more lines. Lines
starting with "#" are comments and are ignored. Each line must
contain following fields, separeated by spaces or tabs:
- Hostname
- Name of the host which will be monitored.
- Ping Interval
- Interval (in seconds) on which ICMP packets will be sent to the host to
check it's status.
- Max. Delay
- Maximum delay (in seconds) after which host considered to be
"down" if no response was received.
- Up Command
- Command which will be executed when host became accessible. This command
is executed using "sh -c" and may contain shell syntax. If
command contain spaces or tabs it should be quoted. If the command is
executing some lenghy operation it is recommended to start it as detached
process (for example using '&'), because icmpmonitor will not resume
monitoring of this and other hosts until command is finished.
- Down Command
- Command which will be executed when host became not accessible. This
command will be executed using "sh -c" and may contain shell
syntax. If command contain spaces or tabs it should be quoted. If the
command is executing some lenghy operation it is recommended to start it
as detached process (for example using '&'), because icmpmonitor will
not resume monitoring of this and other hosts until command is
finished.
- Startup Condition (optional)
- Condition of the host that should be assumed on startup. Possible values
are "auto", "down", "none" and
"up". The parameter is optional with "up" being the
default value. The main purpose is controlling which up/down commands will
be launched on startup. "auto" detects the state of the host
silently on startup and doesn't launch any command first. "down"
assumes the host is down and executes the up command on the first ping
recieved. Similar to "up". "none" starts either up or
down command on startup.
It was reported that some systems (e.g. Solaris 2.5) do not have function
vsnprintf. In such case icmpmonitor will use vsprintf instead, but this could
cause buffer overflow problem.
If you find any other bugs, please follow link to bug tracking
system from ICMPmonitor project home page to file them.
http://www.crocodile.org/software.html
Vadim Zaliva <lord@crocodile.org>
I would like to thank following people for help in developement of this
software: Alexandr S. Dubovicov <shurik@te.net.ua>, Andrey Arhipov
<andy@paco.net>, Bernhard Lutzmann <belu@gmx.at>, Ingo Saitz
<Salz@users.sourceforge.net>