Hi,
I am trying to monitor the TCP and UDP ports using check_tcp.exe for remote windows machines.
I was able to get the result on command prompt.
C:\Program Files\NSClient++\scripts>check_tcp.exe -H 10.160.0.21 –w 2 –c 3
TCP OK - 0.000 second response time on port 3389 |time=0.000395s
How do I use the same with NSClient and configure on webconsole?
Thanks,
check_tcp for windows servers
Re: check_tcp for windows servers
Can I use the check_tcp.exe to check for the UDP ports
Re: check_tcp for windows servers
I can't speak too much on how to do it within the web interface as I haven't done it myself and it's a third party application, but https://docs.nsclient.org/tutorial/#external-scripts covers how to do it via the config files and the nsclient++ forums may help https://forums.nsclient.org/. Taking a quick look at the web UI though there does appear to be section for setting up external scripts.
check_tcp.exe is used to check tcp ports and cannot check udp. You can always use the TCP/UDP Port wizard within Nagios to configure a check for UDP ports and take out the middleman of using the nsclient++ for this.
check_tcp.exe is used to check tcp ports and cannot check udp. You can always use the TCP/UDP Port wizard within Nagios to configure a check for UDP ports and take out the middleman of using the nsclient++ for this.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Re: check_tcp for windows servers
Thanks,
I used the TCP/UDP monitoring wizard. only TCP port is working.
for UDP I am getting unknown value. Not sure what should be the send and expect string and other values. I just want to check if port is fine like TCP
[[email protected] libexec]# ./check_udp -H xx.xx.xx.xx -p 68
With UDP checks, a send/expect string must be specified.
Usage:
check_udp -H host -p port [-w <warning time>] [-c <critical time>] [-s <send str ing>]
[-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 <warn days cert expire>[,<crit days cert expire>]] [-S <use SSL>] [-E]
[[email protected] libexec]# ./check_tcp -H xx.xx.xx.xx -p 3389
TCP OK - 0.011 second response time on 10.105.0.251 port 3389|time=0.010783s;;;0 .000000;10.000000
I used the TCP/UDP monitoring wizard. only TCP port is working.
for UDP I am getting unknown value. Not sure what should be the send and expect string and other values. I just want to check if port is fine like TCP
[[email protected] libexec]# ./check_udp -H xx.xx.xx.xx -p 68
With UDP checks, a send/expect string must be specified.
Usage:
check_udp -H host -p port [-w <warning time>] [-c <critical time>] [-s <send str ing>]
[-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 <warn days cert expire>[,<crit days cert expire>]] [-S <use SSL>] [-E]
[[email protected] libexec]# ./check_tcp -H xx.xx.xx.xx -p 3389
TCP OK - 0.011 second response time on 10.105.0.251 port 3389|time=0.010783s;;;0 .000000;10.000000
Re: check_tcp for windows servers
With the UDP check you must specify a string to send to the destination and an expected response. For example:
Code: Select all
./check_udp -H xx.xx.xx.xx -p 68 -s "SENDSTRING" -e "EXPECTEDRESPONSE"As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Re: check_tcp for windows servers
Thanks, But can this be done without the SENDSTRING" and "EXPECTEDRESPONSE"
Re: check_tcp for windows servers
It cannot. UDP is a connectionless protocol and the only way to determine if a service is really up and listening would be to send data and get a response in return. With tcp it can be determined that a service is up just by establishing a tcp connection(syn,syn/ack,ack) and then closing the connection(without sending any data).
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Re: check_tcp for windows servers
Thanks.. I will check for the sendresponse and expected response and get back to you.
Re: check_tcp for windows servers
Sounds good!
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.