Build precise queries to find exactly what you need
Press ESC to close
Join our next live webinar: “Advanced Nagios Monitoring Techniques” – Register Now
Your review has been submitted and is pending approval.
The plugin check_tftp monitors availability of a TFTP Server, which is normaly used for booting clients over the network.
Current Version
Last Release Date
June 22, 2009
Owner
Nagios Exchange
Website
http://mathias-kettner.de/nagios_plugins.html
Compatible With
check tftp
It downloads a test file from the TFTP server and checks its size against a given value.
Good but in newer versions you have to change following lines: ORIG: RESULT="$(echo get NaGiOs_ChEcK_FiLe | tftp $HOST 2>&1 | head -n 1)" TO RESULT="$(echo get NaGiOs_ChEcK_FiLe | tftp -v $HOST 2>&1 | grep Received)" ORIG: RESULT="$(echo get $FILENAME | tftp $HOST 2>&1 | head -n 1)" TO: RESULT="$(echo get $FILENAME | tftp $HOST 2>&1 | grep Received)" ORIG: *"Received "*" bytes in "*" seconds") TO: *"Received "*" bytes in "*" seconds"*) Than it will work fine again! Klaus Tachtler.
Works well. I found a version 1.0.2 and there was a small bug on line 422: RESULT=$(echo "$RESULT" | head -1 ) which grabbed the wrong string to fine the "file not found" message. Every time you ran the --connect it would return CRITICAL RESULT=$(echo "$RESULT" | head -2 | tail -1 ) -will work there and return OK (I will look into getting v1.0.2 on the exchange with the above patch if it is updated)
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 }
One minor typo I found was on line 411. check_prinzipal_errors should be check_principal_errors. Otherwise, works very well.
You must be logged in to submit a review.
To:
From: