Products
Applications
Support
Company
How To Buy
Skip to main content (Press Enter).
Sign in
Skip auxiliary navigation (Press Enter).
Register
Skip main navigation (Press Enter).
Toggle navigation
Home
Communities
All Communities
Application Networking and Security
Carbon Black
Enterprise Software
Mainframe Software
Symantec Enterprise
Tanzu
VMware {code}
VMware Cloud Foundation
Blogs
All Blogs
Enterprise Software
Mainframe Software
Symantec Enterprise
VMware
Events
VMware Explore 2025
All Events
Enterprise Software
Mainframe Software
Symantec Enterprise
VMware Cloud Foundation Events
Water Cooler
Betas
Flings
Education
Groups
Enterprise Software
Mainframe Software
Symantec Enterprise
VMware
Members
VMware vSphere
View Only
Community Home
Threads
703K
Library
2.7K
Blogs
0
Events
0
Members
100K
Back to discussions
Expand all
|
Collapse all
sort by most recent
sort by thread
Custom JMX Configuration Problem
rgause
May 22, 2009 09:54 PM
I've read the two tutorials and several threads on this and I now have a config that gets past the lifecycle ...
ama_hyperic
May 26, 2009 12:39 PM
You need to specify a class to use for autoinventory. MXServerDetector extends DaemonDetector so you ...
rgause
May 27, 2009 06:15 PM
OK, that get's me a little further.... I ran sigar and played with some queries to identify my tomcat ...
admin
Jul 13, 2009 12:37 PM
..... zzzzz
1.
Custom JMX Configuration Problem
Recommend
rgause
Posted May 22, 2009 09:54 PM
Reply
Reply Privately
Options Dropdown
I've read the two tutorials and several threads on this and I now have a config that gets past the lifecycle checks. However, I can not seem to get the discover or metric checks to pick up anything.
Background: I have several mbeans deployed and running in a Tomcat 6 container. Tomcat gets picked up by the tomcat plugin, and now I am trying to monitor some of the other mbeans.
I've attached the plugin, the output of the JMX MBeanDumper, the lifecycle run, the metric run, and the discover run.
What am I doing wrong?
2.
RE: Custom JMX Configuration Problem
Recommend
ama_hyperic
Posted May 26, 2009 12:39 PM
Reply
Reply Privately
Options Dropdown
You need to specify a class to use for autoinventory. MXServerDetector extends DaemonDetector so you can pass in a ptql query to satisfy the criteria for auto discovery of something. In this case, use sigar and a ptql query to narrow down the specific java process youre interested in. Also, try defining this as a server instead of a service.
<!-- AutoDiscovery -->
<property name="PROC_HOME_ENV" value="JAVA_HOME"/>
<property name="PROC_HOME_PROPERTY" value="ptql:State.Name.eq=java,Args.*.ct=Agent"/>
<property name="PROC_MAIN_CLASS" value="proc.java.home"/>
<plugin type="autoinventory" class="org.hyperic.hq.product.jmx.MxServerDetector"/>
3.
RE: Custom JMX Configuration Problem
Recommend
rgause
Posted May 27, 2009 06:15 PM
|
view attached (0)
Reply
Reply Privately
Options Dropdown
OK, that get's me a little further....
I ran sigar and played with some queries to identify my tomcat process. Here is the output from sigar:
sigar> ps State.Name.sw=java
4262 hyperic May4 1.0G 338M 3.6M S 602:21 java:org.jboss.Main
10876 tomcat May22 822M 418M 5.2M S 55:51 /usr/lib/jvm/java-1.6.0-sun-1.6.0.u7/jre/bin/java
22037 root May5 391M 40M 5.9M S 1765:25 java:org.tanukisoftware.wrapper.WrapperStartStopApp
23509 hyperic 09:47 255M 16M 8.3M R 0:0 java:org.hyperic.sigar.cmd.Runner
sigar> pargs 10876
pid=10876
exe=???
cwd=???
0=>/usr/lib/jvm/java-1.6.0-sun-1.6.0.u7/jre/bin/java
1=>-Djava.awt.headless=true
2=>-Xms256m
3=>-Xmx512m
4=>-XX:MaxPermSize=150m
5=>-XX:PermSize=50m
6=>-Dcom.sun.management.jmxremote.port=8082
7=>-Dcom.sun.management.jmxremote.protocol.port=8083
8=>-javaagent:/usr/share/java/jmxagent.jar
9=>-Dcom.sun.management.jmxremote.ssl=false
10=>-Dcom.sun.management.jmxremote.authenticate=true
11=>-Dcom.sun.management.jmxremote.password.file=/usr/share/tomcat6/conf/jmxremote.password
12=>-Dcom.sun.management.jmxremote.access.file=/usr/share/tomcat6/conf/jmxremote.access
13=>-classpath
14=>/usr/share/java/xalan-j2-serializer.jar:/usr/share/java/xalan-j2.jar:/usr/share/tomcat6/bin/bootstrap.jar:/usr/share/tomcat6/bin/tomcat-juli.jar:/usr/share/java/commons-daemon.jar
15=>-Dcatalina.base=/usr/share/tomcat6
--More-- (Page 1 of 2)
16=>-Dcatalina.home=/usr/share/tomcat6
17=>-Djava.endorsed.dirs=
18=>-Djava.io.tmpdir=/var/cache/tomcat6/temp
19=>-Djava.util.logging.config.file=/usr/share/tomcat6/conf/logging.properties
20=>-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
21=>org.apache.catalina.startup.Bootstrap
22=>start
------------------------
sigar>
That got me to a query of:
sigar> ps State.Name.sw=java,Args.*.eq=org.apache.catalina.startup.Bootstrap
10876 tomcat May22 822M 407M 5.2M S 56:50 /usr/lib/jvm/java-1.6.0-sun-1.6.0.u7/jre/bin/java
sigar>
Running that in the plugin still gets me nothing - there is an added "Args.*.sw=-D".
OK, look at the Javadocs for the MxServerDetector plugin. Fields show up, but have no descriptions/usage instructions.
OK, download source, and review MxServerDetector.java. Now I see how the properties are being used - edit the config, and rerun.... Search is now:
State.Name.sw=java,Args.*.eq=org.apache.catalina.startup.Bootstrap,Args.*.sw=-Dcatalina.home=
sigar looks like this on that query:
sigar> ps State.Name.sw=java,Args.*.eq=org.apache.catalina.startup.Bootstrap,A$
10876 tomcat May22 820M 417M 5.1M S 58:20 /usr/lib/jvm/java-1.6.0-sun-1.6.0.u7/jre/bin/java
sigar>
Run the plugin in discover mode and.... Bing Bing Bing - 1 process discovered!
On to the next battle. The jmx url, username, & password being defined in my xml file are not being picked up by the MxServerDetector.
If I pass them on the command line, the username & password are picked up, but my specified URL is ignored. It seems to insist on using the discovered url which is on a different port.
jconsole with the specified url, username, & password works. jconsole to the discovered port, has never worked (another story...).
Do I need to specify the url someplace else, other than in the config section?
Thanks again!
Bob
4.
RE: Custom JMX Configuration Problem
Recommend
admin
Posted Jul 13, 2009 12:37 PM
Reply
Reply Privately
Options Dropdown
.....
zzzzz
×
New Best Answer
This thread already has a best answer. Would you like to mark this message as the new best answer?
Copyright 2024. All rights reserved.
Powered by Higher Logic