Quantcast
Channel: THWACK: Message List
Viewing all articles
Browse latest Browse all 20518

Re: Monitor Service Ports (Socket Checks)

$
0
0

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)

 

  1. Get a linux server
  2. 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
  3. set up net-SNMP on the server.
  4. 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
  5. Set up one OID for each test. Unfortunately you'll need one OID per test per target. ie:
    1. server1, port 100: oid 9.9.9.9.9.9.1
    2. server1, port 200: oid 9.9.9.9.9.9.2
    3. server1, port 300: oid 9.9.9.9.9.9.3
    4. server2, port 100: oid 9.9.9.9.9.9.4
    5. server2, port 200: oid 9.9.9.9.9.9.5
    6. ....etc...
  6. 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.
  7. 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.


Viewing all articles
Browse latest Browse all 20518

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>