Build precise queries to find exactly what you need
Press ESC to close
Join our next live webinar: “Advanced Nagios Monitoring Techniques” – Register Now
@hk@
Favorites0
Views
Projects0
the latest icecast release removed this file from its distribution, thereforce checks fail - a fix would be greatly appreciated. thank you!
Reviewed 11 years ago
not available any more
Reviewed 13 years ago
this works well for checking our bgp-speakers. it would be even nicer if the "-n" parameter could be ignored so only one command definition would be needed in case you have a different number of neighbors on some devices. Also we had to fix one line: last_output=`/bin/cat /tmp/check_bgp_all.$hostname|grep $neighbor` changed to: last_output=`/bin/cat /tmp/check_bgp_all.$hostname|grep $neighbor:` the ":" is needed to match only exact neighbor IPs, we for example hat x.y.c.2 and x.y.c.20 as neighbors to one bgp-speaker therefore the grep without ":" made for some bad responses which lead to expr-errors later in the script.
besides the typo in line 411. we had to copy the "create tempdir" part to the "connect only check" as otherwise tftp always fails for "permission denied" - resulting in this update: function check_connect () { HOST="$1" # tmp-dir creation is necessary also for connect-only-check # as the tftp get fails otherwise with "permission denied" # 20130509 [email protected] TMPDIR=/tmp/check_tftp mkdir -p "$TMPDIR" cd "$TMPDIR" || { echo "Cannot create temporary directory in /tmp" exit $STATE_UNKNOWN } RESULT="$(echo get NaGiOs_ChEcK_FiLe | tftp $HOST 2>&1 | head -n 1)" rm -f NaGiOs_ChEcK_FiLe # call fixed - was: check_prinzipal_errors "$RESULT" check_principal_errors "$RESULT" case "$RESULT" in *"Error code 1: File not found") echo "TFTP OK - answer from server" exit $STATE_OK ;; *) echo "$RESULT" exit $STATE_CRITICAL ;; esac }
Reviewed 12 years ago
this is because "status" of tftp always reports "connected to.." even if the tftp there is not responding...