aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README.markdown4
-rwxr-xr-xnscaw2
2 files changed, 4 insertions, 2 deletions
diff --git a/README.markdown b/README.markdown
index e294eec..ebb1849 100644
--- a/README.markdown
+++ b/README.markdown
@@ -4,7 +4,9 @@ nscaw
Command wrapper that sends an appropriate passive check to an NSCA server using
`send_nsca`, depending on the command's outcome.
-Make sure `send_nsca` is in `$PATH` and that `NSCAW_SERVER` is set.
+Make sure `send_nsca` is in `$PATH`. You'll almost certainly want to set
+`NSCA_SERVER` in `/etc/default/nscaw` as well, but it makes an effort in
+defaulting to `nsca`.
$ nscaw IMPORTANT_JOB -- important-job -o options args ...
diff --git a/nscaw b/nscaw
index 3e30b4c..de8364f 100755
--- a/nscaw
+++ b/nscaw
@@ -77,5 +77,5 @@ esac
# stdout of send_nsca as it's just a diagnostic message
printf '%s\t%s\t%u\t%s\n' \
"$hostname" "$service" "$code" "$message" |
- send_nsca -H "${NSCAW_SERVER:?}" \
+ send_nsca -H "${NSCAW_SERVER:-nsca}" \
-c "${NSCAW_CONFIG:-/etc/send_nsca.cfg}" >/dev/null