Commit | Line | Data |
---|---|---|
0075d288 AT |
1 | # ICMPmonitor # |
2 | ||
3 | ICMPmonitor pings a set of hosts, executing per-host, user-defined commands | |
4 | whenever a host begins or ceases to respond. It has been tested on OpenBSD, | |
5 | FreeBSD and Debian Linux. | |
6 | ||
7 | Configuration is simple. Each host to monitor should have a corresponding entry | |
8 | in the configuration file. Details of each entry may be found in `README.md`. | |
9 | The example below monitors the host `zardoz.subgeniuskitty.com` with a ping | |
10 | every 30 seconds, printing `A terrible silence echoes...` whenever 180 seconds | |
11 | elapse without receiving a ping response. | |
12 | ||
13 | [zardoz.SGK] | |
14 | host = zardoz.subgeniuskitty.com | |
15 | interval = 30 | |
16 | max_delay = 180 | |
17 | up_cmd = "echo Zardoz returns..." | |
18 | down_cmd = "echo A terrible silence echoes..." | |
19 | start_condition = up | |
20 | ||
21 | Assuming your build environment is suitable, build and execute the example | |
22 | configuration with the following commands. | |
23 | ||
24 | % make clean && make | |
25 | % sudo ./icmpmonitor -f ./icmpmonitor.ini | |
26 | ICMPmonitor: localhost up | |
27 | ||
28 | ICMPmonitor will execute any command you specify. This requires caution but | |
29 | allows access to the full power of the command line. Potential uses include | |
30 | power cycling ports on a PDC, triggering DNS changes, executing remote commands | |
31 | via SSH, writing to syslog, sending an email, or any other command you can | |
32 | imagine. | |
33 | ||
34 | For longer monitoring sessions, consider using `tmux` or `screen` to wrap | |
35 | ICMPmonitor. | |
36 | ||
37 | Obtain ICMPmonitor at <https://git.subgeniuskitty.com/icmpmonitor/.git>. | |
38 | ||
39 | See `README.md` for more information. |