[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Feature request: UDP generic protocol testing
From: |
Jan-Henrik Haukeland |
Subject: |
Re: Feature request: UDP generic protocol testing |
Date: |
Sat, 29 Oct 2005 02:55:03 +0200 |
Update: I found a small bug in the send/expect code that can mess up
the comparison. It's fixed now in the CVS. If the server send more
than 255 bytes back this could mess up the expect test. Could you
please check out the latest monit code from CVS and see if your send/
expect test against a UDP server works now?
Here's my .monitrc setup to test a UDP echo server.
check host tildeslash with address tildeslash.com
if failed port 9877 type udp
send "Hello World!"
expect "Hello World*"
send "Hello Norway"
expect "Hello*"
for 5 times within 8 cycles #Fail tolerant
then alert
To see the trace, I start monit in a one-shot run like this from the
console, "monit -v validate" and the output will look like this if
send/expect succeeded:
<..>
------------------------------------------------------------------------
-------
'tildeslash' succeeded connecting to INET[tildeslash.com:9877]
GENERIC: successfully sent: 'Hello World!'
GENERIC: successfully received: 'Hello World!'
GENERIC: successfully sent: 'Hello Norway'
GENERIC: successfully received: 'Hello Norway'
'tildeslash' succeeded testing protocol [generic] at INET
[tildeslash.com:9877]
However if the server does not respond, because its down, packets
where lost or there is a FireWall someplace filtering out UDP packets
the trace looks like this:
<..>
------------------------------------------------------------------------
-------
'tildeslash' succeeded connecting to INET[tildeslash.com:9877]
GENERIC: successfully sent: 'Hello World!'
GENERIC: error receiving data -- Resource temporarily unavailable
'tildeslash' failed protocol test [generic] at INET[tildeslash.com:
9877].
--
Jan-Henrik Haukeland
Mobil +47 97141255