VMware Cloud Community
rvincent
Contributor
Contributor

MBean Query wild cards.

Hello,

I have a quick hyperic/JMX question. I have a hyperic plugin with the following defined:

<property name="OBJECT_NAME"
value="AgentServerMBeanServer:type=Hosts,host=*,arguments=*"/>

Hyperic doesn’t like it however, giving me a configuration error of:

The configuration has not been set for this resource due to : Invalid configuration: Error retrieving value: ObjectName not found [AgentServerMBeanServer:type=Hosts,host=%host%,arguments=%arguments%]: javax.management.InstanceNotFoundException: AgentServerMBeanServer:type=Hosts,host=%host%,arguments=%arguments%

I have also tried:

<property name="OBJECT_NAME"
value="AgentServerMBeanServer:type= *"/>

and this has a similar error…

What I’m trying to do (in the first case above) is query the MBeanServer for anything that matches the pattern AgentServerMBeanServer:type=Hosts,host=* as the value in host= ? will be only known at runtime. Do you have an idea how to pass wildcards to hyperic such that it will query dynamically? I have been through quite a bit of documentation but am not finding what I’m looking for. I understand that hyperic seems to be interpreting the wild card as a variable, but that variable is not in the plugin and shouldn't be because it is only known at runtime...Is there a mechanism for MBean query in hyperic and if so an example would be helpful. My plugin is attached.

Kind regards,
Rick
0 Kudos
0 Replies