Page 1 of 1

Telnet check

Posted: Tue Nov 09, 2010 4:49 pm
by gshine
I have played with the check_tcp and cannot get a simple telnet to work - Could someone detail the process to check telnet is up on a cisco box or any other box for that matter. I tried copying check_smtp which should be somewhat similar in terms of args/parameters but nothing.

Why is a telnet command not included - Seems very basic?

Thanks
Gary

Re: Telnet check

Posted: Wed Nov 10, 2010 2:43 am
by jchivian
Start by making sure this works...
[root@corp-nagios-001 libexec]# ./check_tcp
check_tcp: No arguments found
Usage:check_tcp -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]
[root@corp-nagios-001 libexec]# ./check_tcp -H localhost -p 5667
TCP OK - 0.004 second response time on port 5667|time=0.004387s;;;0.000000;10.000000
[root@corp-nagios-001 libexec]# ./check_tcp -H localhost -p 5668
Connection refused
[root@corp-nagios-001 libexec]# ./check_tcp -H localhost -p 21
Connection refused
[root@corp-nagios-001 libexec]# ./check_tcp -H localhost -p 22
TCP OK - 0.001 second response time on port 22|time=0.001198s;;;0.000000;10.000000
[root@corp-nagios-001 libexec]# ./check_tcp -H localhost -p 23
Connection refused
[root@corp-nagios-001 libexec]#

Re: Telnet check

Posted: Sun Nov 14, 2010 11:41 pm
by gshine
Yes that works on port 23

Re: Telnet check

Posted: Wed Nov 17, 2010 12:13 am
by jchivian
And then this...
./check_tcp -H someOtherHost -p 23
TCP OK - 0.094 second response time on port 23|time=0.093786s;;;0.000000;10.000000