X-Git-Url: https://git.adam-barratt.org.uk/?a=blobdiff_plain;f=dsa-nagios-checks%2Fevent_handlers%2Fdsa-eventhandler-restart-service;h=5551dd123d4cf304a5009f920c63451bde50c858;hb=05d5f02559ac58df0dcea59590183cf23ef004ce;hp=19ba0d2a76c322ad84631245661e522c1bc78ef1;hpb=69e58a4410d58e4e4a1c2ed036575be8b3cf99ee;p=mirror%2Fdsa-nagios.git diff --git a/dsa-nagios-checks/event_handlers/dsa-eventhandler-restart-service b/dsa-nagios-checks/event_handlers/dsa-eventhandler-restart-service index 19ba0d2..5551dd1 100755 --- a/dsa-nagios-checks/event_handlers/dsa-eventhandler-restart-service +++ b/dsa-nagios-checks/event_handlers/dsa-eventhandler-restart-service @@ -17,20 +17,12 @@ state="$1" type="$2" attempt="$3" host="$4" -service="$5" +starton="$5" +service="$6" # What state is the service in? case "${state}" in - OK) - # The service just came back up, so don't do anything... - ;; - WARNING) - # We don't really care about warning states, since the service is probably still running... - ;; - UNKNOWN) - # We don't know what might be causing an unknown error, so don't do anything... - ;; - CRITICAL) + "${starton}") # Aha! The service appears to have a problem - perhaps we should restart it # Is this a "soft" or a "hard" state? case "${type}" in