Hello everyone,.
im having some issues with the check_tftp plugin for nagios. I obtained the file from mathias-kettner.de/download/check_tftp. The script does run and it does report output,. but nagios interprets the output as an error message and makes the host appear down,.
this is the output i get from the nagios interface…
check-tftp CRITICAL 05-19-2005 10:18:55 0d 20h 53m 4s 1/10
“tftp> Error code 1: TFTP Error: File does not exist”
however according the the documentation in the source code of check_tftp, this is the correct response i need to get back from the server because the check_tftp plugin is quering for a non existent file.
another issue im having is sometimes the status of my host appear to be down all tho its receiving ping responses back from the server and according to nagios there is no packet loss,…
i have set the warning threshhold to 300 ms and critical to 500 ms,… but still for no reason nagios reports the hosts as being down when in reality they are not…
can anyone give me any feedback please,… anya dvice is much appreciated,
Edited ]
[root@tia2665 libexec]# ./check_tftp --connect localhost
OK - answer from server
Looks OK to me. Perform the command from the command line, and paste it here as I did.
"the status of my host appear to be down all tho its receiving ping responses back from the server and according to nagios there is no packet loss,…"
Explain that in more detail please.
If nagios reports no status loss, then nagios is not reporting it as being down.
Service check check_fping responds as OK, then the host is NOT reported as being down.
[quote=“jakkedup”]"the status of my host appear to be down all tho its receiving ping responses back from the server and according to nagios there is no packet loss,…"
Explain that in more detail please.
If nagios reports no status loss, then nagios is not reporting it as being down.
Service check check_fping responds as OK, then the host is NOT reported as being down.[/quote]
well i figured out what the issue was,. in checkcommands.cfg i was hardlinking the check_ping function to /bin/ping instead of $USER1$/check_ping ,… and apparently that was what caused all the hsot down issues…
but in regards to the tftp problem,. take this to account,. i am not monitoring a tftp server on localhsot,… i am monitoring a tftp server on a remote (windows) host ,… could that be the problem ?
thsi is the output i get ,…
[root@lookout libexec]# ./check_tftp --connect 208.51.238.2
"tftp> Error code 1: TFTP Error: File does not exist"
[root@lookout libexec]#
but according to the check_tftp script ,… the correct response your supposed to receive is … “tftp> Error code 1: TFTP Error: File does not exist”
so im not sure if nagios si the one misinterreting the output…
any advice???
ps: thanks for the help, its greatly appreciated.
[root@tia2665 libexec]# ./check_tftp --connect alpha
OK - answer from server
I still get OK even on a remote tftp server.
I would download the file again. I never used it before, so I copied/pasted it from the link you gave, and it works fine. So perhaps you have a corrupted file.
wow, that is unusual,… are you quering a tftp server running windows or linux? maybe that has something to do with it.,… if you dont mind, will you try it on this ip.
check_tftp --connect 208.51.238.2
let me know if you still get the same OK.
thanks again
Good point, but I don’t have any windows boxes running tftp to check, and I can’t check outside of our firewall.
Try checking a linux box, like localhost (assuming your nagios pc is on linu:evil:.
i get it to work on tftp servers running on linux,. but the particular tftp server i am trying to connect to is running on windows. any ideas?
Yes, check the settings on the windows box. It must be config differently.
You can config a tftp server to allow people to make files, and others maybe setup that the file has to exist FIRST, and then you can write to that file.
wooohoooo1!!! i figured it out,… the problem was that unix tftp servers and windows tftp servers return differnt error messages when the file is not found… so i modified check_tftp like this:
check_principal_errors "$RESULT"
case "$RESULT" in
*"Error code 1: TFTP Error: File does not exist")
echo "OK - answer from server"
exit $STATE_OK
;;
*)
echo "$RESULT"
exit $STATE_CRITICAL
;;
esac
}
looks the same but its not,…
unix tftp server report file nto found, windows report file does not exist.
once again thanks for your assistance!
You da man, thx for sharing your information and solution with us.