From cb654384ddd6d8de2166ee346c1377b132f939e3 Mon Sep 17 00:00:00 2001 From: Aaron Taylor Date: Sat, 5 Oct 2019 03:10:56 -0700 Subject: [PATCH] Updated config file with examples suitable for public release. --- icmpmonitor.ini | 45 ++++++++++++++++++++++++++++++++------------- 1 file changed, 32 insertions(+), 13 deletions(-) diff --git a/icmpmonitor.ini b/icmpmonitor.ini index 5886b33..58d3db5 100644 --- a/icmpmonitor.ini +++ b/icmpmonitor.ini @@ -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 -- 2.20.1