I know I could check for telnet on a known IP using other programs like:

nmap -A 192.168.0.1/32 -p 23

Or, look for open ports from 20 to 30 on host.example.com:

nc -z host.example.com 20-30

I need to create a batch file, since I think that is how NSClient++ works on Windows Server being monitored by Nagios. Currently I have CPU, Disk, Memory, NSClient, and PING being monitored but I need a Specific port that I can also Monitor.

link|improve this question
Just to be clear, you want to check connectivity TO another host from the monitored Windows host, right? – Matt Simmons Jan 8 at 23:55
feedback

1 Answer

Assuming you have a monitored Windows server, and you want to check to see if it has connectivity to a remote machine, I would recommend the following:

Use this PowerShell code (or one much like it) to write a script that checks a remote port.

Then set up the CheckExternalScripts module to run and interpret the output of the PowerShell script.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.