[Nagiosplug-help] Testing telnet more carefully (check_tcp)

C. Bensend benny at bennyvision.com
Thu Oct 10 11:51:03 CEST 2002


Hey folks,

	I have a bunch of *NIX machines here that I need to
test for responsiveness, so I figured I would devise a
check_telnet command.  Yes, they're running telnet.  Yes,
I know.  ;)

	So, I figured I'd whip something together with
check_tcp.  Testing for a TCP connection on port 23 isn't
really sufficient - development beats the snot out of these
machines, so I really need to make sure I actually get a
login prompt.  Many times, when a machine goes belly up,
it will react on port 23, but just hang before bringing up
a prompt.

	I figured one of the following would probably do it:

check_tcp -H $HOSTADDRESS$ -p 23 -e login
check_tcp -H $HOSTADDRESS$ -p 23 --expect="login:"
check_tcp -H $HOSTADDRESS$ -p 23 -e login:
check_tcp -H $HOSTADDRESS$ -p 23 -e "login:"

	They all respond:

0 1
1 1
Invalid response from host

	Interesting.  This is check_tcp (nagios-plugins 1.3.0-alpha1)
1.1.1.1 - is anyone using the expect option for check_tcp 
successfully?  Am I using it incorrectly?  Have any better 
suggestions for what I'm trying to do?

Thanks!

Benny


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
There's always time for Cheerios...




More information about the Help mailing list