SNMP - getting information from a process

I need to set up a process monitor on multiple servers using Zenoss monitoring tool. The problem I am facing is how can I get information about a specific process via SNMP? I'm not familiar with SNMP at all and I'm having trouble figuring out what I need.

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

Any help is appreciated here.

+3


source to share


4 answers


You need to query hrSWRunTable to collect the information you need. This MIB gives you a lot of information like process name, path, type, status, parameters, CPU and RAM usage, although these two information are stored in another MIB ( hrSWRunPerfEntry ). However, how you do this depends on the environment you are using, I'm pretty sure the vbs includes the SNMP library.



+2


source


Here is an example of a NetSnmp search from a Linux host. (I would add this as a comment to the accepted answer from @ raz3r, but I wanted 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 

      

+1


source


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

0


source


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

0


source







All Articles