Advertisements

How to check that a specific process is running, ‘the dude’

Available: if(array_find(oid_column(“1.3.6.1.2.1.25.4.2.1.2”), “db2sec.exe”)>0, 1, -1)
Error: if(array_find(oid_column(“1.3.6.1.2.1.25.4.2.1.2”), “db2sec.exe”)>0, “”, “DB2_db2sec.exe not detected by SNMP probe”)
Value: 1
Unit: running
Rate: none

Change “db2sec.exe” with the name of the service you like to monitor. One thing I also noticed is, that the name is case-sensitive! Write the service name the same as you see it in the Windows Task Manager.

Advertisements

Getting my ‘the dude’ on part II

So after much futzing I was able to get a service monitored in ‘the dude’ I learned about a whole bunch of things like SNMP Oid’s etc…. at first I tried to create a probe like this

HOWTO check if specific SERVICE is running or not

Create New Probe and tag it with your required target device.

Probe Name:  check_telnet_service
Type:  Function
Available:  if(array_find(oid_column(“1.3.6.1.4.1.77.1.2.3.1.1″),”Telnet”)>0, 1, 0)
Error:  if(array_find(oid_column(“1.3.6.1.4.1.77.1.2.3.1.1″),”Telnet”)>0, “”, “Telnet not detected by SNMP probe”) 
Value
:  1
Unit:

From here http://aacable.wordpress.com/category/mikrotik-related/page/2/

But, that didn’t work for me. Eventually I ran into the fact that you have a copy of SNMPwalk inside of the tools of ‘the dude’ at that point you can paste in 1.3.6.1.4.1.77.1.2.3.1.1 into the top right of the Oid, and then I was able to find the service in question. Then awesomely enough, you can right click and say create SNMP probe from that service. Then I tested. Part of what was difficult was that you have to be patient with the SNMP service. It takes a minute or two before it registers that a service is down! But, I verified it, and this did in fact allow you to monitor whether a service was running or not!

Getting my ‘The Dude’ On

So many moons ago I started implementing ‘the dude’. Recently, I thought I would revive that project. ‘The Dude’ is really one neat piece of software. After messing with it some I was trying to get the CPU stats to be recorded, then I learned that it collects them through SNMP. Now SNMP is of course not enabled by default so I needed a method of enabling it. So SolarWinds makes a tool called the SNMP Enabler for Windows  this looked like the perfect tool but it took some jimmying to get it working. So in order to install SNMP (this is for windows XP) it needs the install media. So luckily I just downloaded a copy of Windows XP service Pack 3 from the microsoft licensing site. (Not having to slipstream service pack 3, bonus!) I extracted the .iso to a network share, now this is important extract the whole thing not just the i386 folder (this hung me up). Also download yourself a copy of pstools so that you have psexec (you will need this for the network install). Click the Settings ‘tab’, Click the Psexec and point it to the path of your PsExec.exe (oh it seems if you are logged onto the box as an admin it behaves more nicely as well, maybe with UAC off) I check marked the Override Graphic Acceleration, and Show Debug Window On Error. Then click the Add button to add the installation data location. I chose Windows Xp Pro, SP3 and then for the path \\seattle-server4\installcds\xpsp3slipstreamed (not to the i386 folder, up one folder)

I’m not sure if all those settings are necessary but it wasn’t working and then after clicking a couple of things it magically started working, so there you go. On occasion the ‘push’ of SNMP won’t take, I just rerun it and usually the second time it will work, go figure. So now my ‘the dude’ shows more nifty stats! Next up, I want to learn how to make a plugin to monitor a specific service!