Telnet check

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
gshine
Posts: 7
Joined: Tue Nov 09, 2010 4:47 pm

Telnet check

Post 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
jchivian
Posts: 5
Joined: Fri Nov 05, 2010 7:07 pm

Re: Telnet check

Post 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]#
gshine
Posts: 7
Joined: Tue Nov 09, 2010 4:47 pm

Re: Telnet check

Post by gshine »

Yes that works on port 23
jchivian
Posts: 5
Joined: Fri Nov 05, 2010 7:07 pm

Re: Telnet check

Post 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
Locked