diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2017-06-16 11:33:52 +1200 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2017-06-16 11:33:52 +1200 |
commit | fe47a13d8f88739eaf60979e82cef5c78ec3fb98 (patch) | |
tree | 09e73fb0e14e764a0299c1e1b46fae56226694f9 | |
parent | Strip trailing blank lines (diff) | |
download | nscaw-fe47a13d8f88739eaf60979e82cef5c78ec3fb98.tar.gz nscaw-fe47a13d8f88739eaf60979e82cef5c78ec3fb98.zip |
Semi-sensible default for NSCA_SERVER
-rw-r--r-- | README.markdown | 4 | ||||
-rwxr-xr-x | nscaw | 2 |
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 ... @@ -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 |