Welcome to the kludgiest solution I can think of. And before I dig into it, let me reinforce rob.hock's suggestion - SAM is designed to do this. NPM is not. It may have no other value to you, but it beats the heck out of building a solution yourself (or doing what I'm about to suggest)
- Get a linux server
- on the linux server, write a script that "pings the port" - it will likely be a perl or shell script that uses a telnet command to connect on a particular port and waits for a specific response. Make sure the script outputs something pretty obvious at the end - like 0 for down, 1 for up.
one example is here: https://github.com/nixsavy/shell-scripts/blob/master/ping-port-test-1001.sh
another one that uses nc (netcat) instead of ping or telnet is here: http://stackoverflow.com/questions/4922943/how-to-test-if-remote-tcp-port-is-opened-from-shell-script - set up net-SNMP on the server.
- In the snmpd.conf file, create additional OIDS (something obvious like 9.9.9.9.9.9.9) that executes a script on the linux server when you poll it
More information on how to do that can be found here: http://www.net-snmp.org/wiki/index.php/Tut:Extending_snmpd_using_shell_scripts - Set up one OID for each test. Unfortunately you'll need one OID per test per target. ie:
- server1, port 100: oid 9.9.9.9.9.9.1
- server1, port 200: oid 9.9.9.9.9.9.2
- server1, port 300: oid 9.9.9.9.9.9.3
- server2, port 100: oid 9.9.9.9.9.9.4
- server2, port 200: oid 9.9.9.9.9.9.5
- ....etc...
- Now use the NPM Universal device poller tool to set up your new OIDS. You'll always be running them against your one linux server.
- Finally, set up an alert for each UnDP poller
I know it's really REALLY clunky, but it is probably the only way to get SolarWinds NPM to do it.