[Nagiosplug-devel] check_udp

Ton Voon ton.voon at altinity.com
Mon Mar 27 00:40:02 CEST 2006


On 24 Mar 2006, at 20:06, John P. Rouillard wrote:

>
> In message <129FE073-1B41-4845-A1DC-07847B5E1E86 at altinity.com>,
> Ton Voon writes:
>> On 24 Mar 2006, at 15:45, John P. Rouillard wrote:
>>
>>> Doesn't something like
>>>
>>>    echo "test" | nc -u -p 3333 -l
>>>
>>>    check_udp -s '' -e test -p 3333 -H localhost
>>>
>>> work? You need to send the empty packet to provoke a response.
>>
>> You're brilliant! That works really well now - t/check_udp.t now does
>> tests for sending and receiving of packets. Just committed into CVS.
>>
>> I seem to need to kill nc for the sending test. If I'm doing
>> something wrong with nc, let me know.
>
> Not quite sure what you are running, but as long as nc has stdin open
> in udp mode it will stay up. I think:
>
>   nc -u -p 3333 -l < /dev/null
>
> should allow a connect, spit out what it received then exit since  
> stdin
> is closed.

Thanks - this works if I also combine it with the -w option.

Ton



http://www.altinity.com
T: +44 (0)870 787 9243
F: +44 (0)845 280 1725
Skype: tonvoon






More information about the Devel mailing list