From 29a608d713622f1ecdfacd2bdd88797c928dde40 Mon Sep 17 00:00:00 2001 From: "Adam D. Barratt" Date: Mon, 28 Oct 2019 18:23:24 +0000 Subject: [PATCH] dsa-eventhandler-restart-service: update comments to match usage Signed-off-by: Adam D. Barratt --- dsa-nagios-checks/debian/changelog | 2 ++ .../event_handlers/dsa-eventhandler-restart-service | 9 +++++---- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/dsa-nagios-checks/debian/changelog b/dsa-nagios-checks/debian/changelog index 8426b4c..701985b 100644 --- a/dsa-nagios-checks/debian/changelog +++ b/dsa-nagios-checks/debian/changelog @@ -8,6 +8,8 @@ dsa-nagios-checks (119) UNRELEASED; urgency=medium * dsa-check-soas: fix variable scoping * Add dsa-check-clamav-signatures. * dsa-check-config: fix typo in log check for "OK" statuses. + * dsa-eventhandler-restart-service: update comments to match current + usage. [ Julien Cristau ] * port dsa-check-statusfile and dsa-check-memory to python3 diff --git a/dsa-nagios-checks/event_handlers/dsa-eventhandler-restart-service b/dsa-nagios-checks/event_handlers/dsa-eventhandler-restart-service index 5551dd1..28dfd90 100755 --- a/dsa-nagios-checks/event_handlers/dsa-eventhandler-restart-service +++ b/dsa-nagios-checks/event_handlers/dsa-eventhandler-restart-service @@ -1,6 +1,6 @@ #!/bin/sh # -# Event handler script for restarting a service on the local machine +# Event handler script for restarting a service via NRPE # # Note: This script will only restart the service if the service is # retried 3 times (in a "soft" state) or if the service somehow @@ -11,7 +11,8 @@ # $2 $SERVICESTATETYPE$ # $3 $SERVICEATTEMPT$ # $4 $HOSTADDRESS$ -# $4 init script name +# $5 state to match against ("WARNING" or "CRITICAL") +# $6 NRPE service name to use state="$1" type="$2" @@ -39,14 +40,14 @@ case "${state}" in # result in a "soft" recovery. If that happens no one gets notified because we # fixed the problem! 3) - # Call the init script to restart the HTTPD server + # Call the service restart script via NRPE /usr/lib/nagios/plugins/check_nrpe -n -H "${host}" -c "${service}" ;; esac ;; # The service somehow managed to turn into a hard error without getting fixed. # It should have been restarted by the code above, but for some reason it didn't. - # Let's give it one last try, shall we? + # Let's give it one last try, shall we? # Note: Contacts have already been notified of a problem with the service at this # point (unless you disabled notifications for this service) HARD) -- 2.20.1