Question

I need to setup a process monitor on a number of servers using a monitoring tool called Zenoss. The problem I'm facing is how can I get information on a specific process via SNMP? I'm not familiar with SNMP at all and I'm having trouble finding out what I need.

I've been trying to use a tool called SNMP-Probe but it only seems to give basic system information, nothing that I need or can use.

Any help here is appreciated.

Was it helpful?

Solution

What you need is to query the hrSWRunTable in order to gather the information you need. This MIB gives you a lot of information such as process name, path, type, status, parameters, CPU and RAM usage even though those two informations are stored on another MIB (hrSWRunPerfEntry). However how you do that "query" depends on the environment you're using, I am almost sure that vbs includes an SNMP library.

OTHER TIPS

I was just working on the same thing

snmpwalk -v2c -c public xxx.xxx.xxx.xxx .1.3.6.1.2.1.25.4.2.1.2

HOST-RESOURCES-MIB::hrSWRunName

Here is a example retrieval via NetSnmp from a Linux host. (I would have added this as a comment on the accepted answer from @raz3r, but I wanted ability to format the text!)

 snmptable -v2c -Ci -c public myserver  HOST-RESOURCES-MIB::hrSWRunTable
SNMP table: HOST-RESOURCES-MIB::hrSWRunTable

 index hrSWRunIndex       hrSWRunName               hrSWRunID                        hrSWRunPath                                                                                                                  hrSWRunParameters hrSWRunType hrSWRunStatus
     1            1            "init" SNMPv2-SMI::zeroDotZero                       "/sbin/init"                                                                                                                                 "" application      runnable
     2            2        "kthreadd" SNMPv2-SMI::zeroDotZero                         "kthreadd"                                                                                                                                 "" application      runnable
     3            3     "ksoftirqd/0" SNMPv2-SMI::zeroDotZero                      "ksoftirqd/0"                                                                                                                                 "" application      runnable
 // other rows snipped for brevity 

Unfortunately, I wasn't able to find out exactly how to do this. I ended up going with a vbs script on each machine to find the misbehaving process and kill it automatically.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top