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
How do I determine Availability for a JMX server
mfesteba
Jan 28, 2009 03:54 PM
Hi, I have been developing a custom plugin that connects to a JMX server for a week or so now. However, ...
excowboy
Feb 08, 2009 08:50 PM
Hi, please provide the complete plugin code if possible. Does the autodiscovery work right now ...
uncphan
Jan 31, 2012 06:15 PM
I'm trying to do the exact same thing as the OP. Right now I've seriously skinny'd down my plugin ...
1.
How do I determine Availability for a JMX server
Recommend
mfesteba
Posted Jan 28, 2009 03:54 PM
Reply
Reply Privately
Options Dropdown
Hi,
I have been developing a custom plugin that connects to a JMX server for a week or so now. However, I have run into problems when defining the Availability for the server. It always gives me the result 0 (down) never 1 (up). Therefore, no metrics are being retrieved from the agent.
I find the documentation in this area a little sparse. My plugin code is as below:-
<plugin name="SIP" package="com.avaya.hyperic.jmxdetector" class="SipAsPlugin">
<classpath>
<!-- for jmxmp protocol -->
<include name="lib/jmxremote_optional-*.jar"/>
<include name="pdk/lib/mx4j"/>
</classpath>
<filter name="template"
value="${OBJECT_NAME}:${alias}"/>
<property name="HAS_BUILTIN_SERVICES" value="true"/>
<filter name="logger"
value="sh:name=SipProcessor,USCLCascadeType=sh,USCLcascadeID=1:${alias1}"/>
<server name="SIP A/S"
description="Sun JVM" version="1.5.x">
<config name="jmx" >
<option name="jmx.url"
description="JMX URL to MBeanServer"
default="service:jmx:jmxmp://192.168.30.117:5780"/>
<option name="jmx.username"
description="JMX username"
optional="true"
default=""/>
<option name="jmx.password"
description="JMX password"
optional="true"
type="secret"
default=""/>
<option name="ms.process.query" description = "MS Name" default="State.Name.eq=java,Args.*.eq=net.ubiquity.asb.ms.bootstrap.ManagementServerBootstrap"/>
<option name="sh.process.query" description = "SH Name" default="State.Name.eq=java,Args.*.eq=net.ubiquity.asb.sh.bootstrap.ServiceHostBootstrap"/>
</config>
<config include="jmx"/>
<metric name="Availability"
template="sigar:Type=ProcState,Arg=%ms.process.query%:State"
indicator="true" category="AVAILABILITY"/>
<plugin type="autoinventory"
class="com.avaya.hyperic.jmxdetector.SipAsServerDetector"/>
<plugin type="measurement" class="com.avaya.hyperic.jmxdetector.SipAsMeasurementPlugin"/>
<metric name="SIP A/S Time"
alias1="HostSipInitialRequestsPerSecondIn"
template="${logger}"/>
</server>
</plugin>
After debugging against the hyperic code base I see that ms.process.query is never being resolved correctly when being processed. This looks to be the problem. But why? Is there a bug with hyperic? If this property is resolved correctly, maybe our Availability would be 1.
Perhaps as an alternative approach, how can I avoid using a PSQL expression for the availability? Maybe hard code this value to 1 somehow
Can someone please help! Thanks in advance
2.
RE: How do I determine Availability for a JMX server
Recommend
excowboy
Posted Feb 08, 2009 08:50 PM
Reply
Reply Privately
Options Dropdown
Hi,
please provide the complete plugin code if possible.
Does the autodiscovery work right now ?
The option process.query is somewhere hardcoded in the SigarMeasurementPlugin.java, so could you try to change ms.process.query to process.query. Maybe this is the problem ...
Cheers,
Mirko
3.
RE: How do I determine Availability for a JMX server
Recommend
uncphan
Posted Jan 31, 2012 06:15 PM
Reply
Reply Privately
Options Dropdown
I'm trying to do the exact same thing as the OP. Right now I've seriously skinny'd down my plugin xml in order to just do the discovery component, but I can't get it to discover my jmx process no matter what it seems like. I've included the jmx-optional jar into the mx4j folder, so that's why i haven't explicitly called it out in the classpath section.
Any thoughts?
Here's my plugin xml file:
<?xml version="1.0"?>
<!DOCTYPE plugin [
<!ENTITY sun-jvm-service SYSTEM "/pdk/plugins/sun-jvm-service.xml">
<!ENTITY process-metrics SYSTEM "/pdk/plugins/process-metrics.xml">
]>
<plugin>
<classpath>
<include name="pdk/lib/mx4j"/>
<!-- following are relative to installpath -->
</classpath>
<filter name="template"
value="${OBJECT_NAME}:${alias}"/>
<server name="Agent"
version="0.9"
description="Agent">
<!-- derive installpath from -Dtc.install-root=... -->
<property name="PROC_HOME_PROPERTY"
value="agent.install-root"/>
<property name="OBJECT_NAME"
value="com.company.project:TYPE=Agent"/>
<!-- default jmx.url -->
<property name="jmx.url" value="service:jmx:jmxmp://localhost:4199"/>
<!-- from jmx-plugin.xml -->
<config include="jmx"/>
<plugin type="autoinventory"
class="org.hyperic.hq.product.jmx.SunMxServerDetector"/>
</server>
</plugin>
×
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