I am on the way to monitor OFTP Odette server is a live with help of check_tcp.
I can telnet to the host and get the following output:
OMD[DRP]:~/lib/nagios/plugins$ telnet 10.1.2.3 3305
Trying 10.1.2.3...
Connected to 10.1.2.3.
Escape character is '^]'.
IODETTE FTP READY
A following \n terminates the session.
Beside that the port is answering I also want to check if the correct response IODETTE FTP READY is sent. I tried different combinations of the option -e but none is working:
OMD[DRP]:~/lib/nagios/plugins$ ./check_tcp -H 10.1.2.3 -p 3305 -e 'IODETTE FTP READY' -vvv
Using service TCP
Port: 3305
flags: 0x2
server_expect_count: 1
0: IODETTE FTP READY
looking for [IODETTE FTP READY] anywhere in []
couldn't find it
looking for [IODETTE FTP READY] anywhere in []
couldn't find it
received 24 bytes from host
#-raw-recv-------#
#-raw-recv-------#
I says it received 24bytes but in the raw I see nothing.
Also not only in the RAW output is nothing but in the verbose output as well looking for [IODETTE FTP READY] anywhere in []
Have done a qick test myself, this sould look like this:
OMD[build]:~/local/lib/nagios/plugins$ ~/lib/nagios/plugins/check_tcp -H webbox -p 6556 -e "check_mk"
TCP OK - 0.343 second response time on webbox port 6556 [<<<check_mk>>>]|time=0.342826s;;;0.000000;10.000000
OMD[build]:~/local/lib/nagios/plugins$ ~/lib/nagios/plugins/check_tcp -H webbox -p 6556 -e "check_mk" -vvv
Using service TCP
Port: 6556
flags: 0x2
server_expect_count: 1
0: check_mk
looking for [check_mk] anywhere in [<<<check_mk>>>
Version: 2.0.0p21
AgentOS: linux
]
found it
received 49 bytes from host
#-raw-recv-------#
<<<check_mk>>>
Version: 2.0.0p21
AgentOS: linux
#-raw-recv-------#
TCP OK - 0.064 second response time on webbox port 6556 [<<<check_mk>>>
Version: 2.0.0p21
AgentOS: linux]|time=0.064288s;;;0.000000;10.000000
OMD[build]:~/local/lib/nagios/plugins$
So i thik there is a connection issue, if you like you can do capture the network traffic with tcpdump. This might shed some light on the problem…
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed. Contact an admin if you think this should be re-opened.