[Nagiosplug-devel] check_UDP

Thomas Guyot-Sionnest dermoth at aei.ca
Tue Jan 30 06:53:46 CET 2007

On 10/01/07 12:00 PM, uemit.altan at degussa.com wrote:
> Hello,
> I have problems with using the nagios-plugin "check_udp". I have the
> version "check_UDP (nagios-plugins 1.4.4) 1.79".
> If I perform the command "./check_udp -H -p 53 -4 -w 5 -c 8"
> on our Nagios-Server I get the following output:
> With UDP checks, a send/expect string must be specified.
> Usage: check_UDP -H host -p port [-w <warning time>] [-c <critical time>]
>                   [-s <send string>] [-e <expect string>] [-q <quit
> string>]
>                   [-m <maximum bytes>] [-d <delay>] [-t <timeout seconds>]
>                   [-r <refuse state>] [-M <mismatch state>] [-v] [-4|-6]
> [-j]
>                   [-D <days to cert expiry>] [-S <use SSL>] [-E]
> If I perform the command with send/except string like "./check_udp -H
> -p 53 -4 -w 5 -c 8 -s test1 -e test2 -q test3 -v" I get the
> following output:
> Using service UDP
> Port: 53
> flags: 0x1a
> Send string: test1
> Quit string: test3
> server_expect_count: 1
>         0: test2
> CRITICAL - Socket timeout after 10 seconds
> So what is wrong with the syntax of my command and could you please send me
> an example command?
> Thank you in advance!

To use check_udp you need to be able to "speak" the protocol you want to
check. It also requires that the answer comes back to the same port is
originated from.

In the case of DNS it's pretty hard to make a real check, though maybe
by sending more characters you would have gotten an answer, as in:

/check_udp -H -p 53 -4 -w 5 -c 8 -s test11111111 -e te

For checking a DNS server you should rather use check_dns, which is able
to send real queries and verify the response.


More information about the Devel mailing list