|  |  | 
| Subject: | OS Processes not being found | 
| Author: | [Not Specified] | 
| Posted: | 2015-07-28 15:28 | 
I have a java program called router-prod2 that I want to monitor. I added a process class called router-prod2. The field "include processes like" contains "router-prod2", and all other fields to define the process have been left blank. Screenshot at http://i.imgur.com/PEtqt3j.png
On the linux server that I am monitoring, I can run "ps axho args | grep router-prod2" and the expected process is shown. I can also do "ps axho args > somefile", then copy/paste that file into the Test All Process Class Regex tester, and the expected processes are found.
But then when I remodel the server that runs this process, Zenoss never find the process (it isn't listed under OS Processes). Another unrelated process is found, so I don't think it's a matter of snmp being broken for the whole server.
Can anyone tell me how I might troubleshoot this
| Subject: | NET-SNMP has a hard limit of | 
| Author: | [Not Specified] | 
| Posted: | 2015-07-29 06:37 | 
NET-SNMP has a hard limit of 128 characters supported in the hrSWRunParameters table. If your pattern is not in the first 128 characters it will be missed. We have a lot of java apps here where this is a common problem. All the java command line args and jar files are first, and the interesting part of the app name is at the end where SNMP cannot report it.
| Subject: | The 128 character limit ended | 
| Author: | [Not Specified] | 
| Posted: | 2015-07-29 10:43 | 
The 128 character limit ended up being the issue here. Thanks! I never woulda found that on my own.
I ended up changing my Java commands to use "-DZenossId=router-prod2", so I can make sure the string router-prod2 appears near the front of the command. And Zenoss is able to find it now.
I have various programs that I'm monitoring, such as router-prod2, router-beta2, etc. Does anyone have a regex that will work in the "Replace command line text" "with" fields that will allow Zenoss to extract the name of the program (router-prod2, in this case).
Here's the 128 characters from the process list that Zenoss will see:
/usr/lib/jvm/java-8-oracle/jre/bin/java -Xmx1024m -DZenossId=router-prod2 -Dcom.sun.management.jmxremote.port=9000 -Dcom.sun.ma
| Subject: | Something like: | 
| Author: | [Not Specified] | 
| Posted: | 2015-07-29 11:40 | 
Something like:
^.*/(java) -Xmx1024m (-DZenossId=\w*).*
Replace \1 \2
Will get you /usr/lib/jvm/.../java router-prod2
I think. Untested.
| < | Previous Drop "info" events? | Next Does Zenoss store LVM UUID info anywhere - linux box polled via SNMP | > |