Updated config file with examples suitable for public release.
authorAaron Taylor <ataylor@subgeniuskitty.com>
Sat, 5 Oct 2019 10:10:56 +0000 (03:10 -0700)
committerAaron Taylor <ataylor@subgeniuskitty.com>
Sat, 5 Oct 2019 10:10:56 +0000 (03:10 -0700)
icmpmonitor.ini

index 5886b33..58d3db5 100644 (file)
@@ -1,15 +1,34 @@
-[kryten.subgeniuskitty.com]
-host = kryten.subgeniuskitty.com
-interval = 1
-max_delay = 10
-up_cmd = "echo UP: kryten.SGK"
-down_cmd = "echo DOWN: kryten.SGK"
-start_condition = up
+# Sample configuration file for ICMPmonitor.
+
+################################################################################
+
+# Each host entry requires a unique label.
+[Example - localhost]
+
+# Remote host, either an IP address or fully-qualified hostname.
+host = 127.0.0.1
+
+# Ping interval.
+interval = 2
+
+# Grace period for missed pings before executing 'down_cmd'.
+max_delay = 30
 
-[talisker.subgeniuskitty.com]
-host = talisker.subgeniuskitty.com
-interval = 1
-max_delay = 10
-up_cmd = "echo UP: talisker.SGK"
-down_cmd = "echo DOWN: talisker.SGK"
+# Command to execute when host first responds to ping after being down.
+up_cmd = "echo ICMPmonitor: localhost up"
+
+# Command to execute when host fails to respond for longer than 'max_delay'.
+down_cmd = "logger -s ICMPmonitor: localhost down - how\!\?\!"
+
+# Should ICMPmonitor consider the host to be 'down' or 'up' upon startup?
 start_condition = down
+
+################################################################################
+
+[A second example]
+host = localhost
+interval = 15
+max_delay = 60
+up_cmd = "echo example1 && echo example2" # Execute multiple commands
+down_cmd = "/bin/sh /dev/null"            # Call external scripts
+start_condition = up