VMware Cloud Community
amurkes
Contributor
Contributor

Can MBeans and their attributes be auto-discovered?

Hi all,

I need to monitor various JBoss 4.0 servers and extract metrics out of custom MBeans. I managed to monitor the metrics I care about by following this doc:
http://support.hyperic.com/confluence/display/DOCSHQ30/JBoss+Custom+MBean+Plugin

But right now I must specify in the xml plugin the exact names of each mbean and each metric. What I want, ideally, is to specify just the mbean domain in the plugin, and then see all available MBeans and their attributes and actions in the server UI.

For example, if I have mbeans "MyCompany:name=Counters" and "MyCompany:name=ComponentVersions", I want to specify only "MyCompany" in the plugin, and then auto-magically see both mbeans and all their attributes in the server UI.

The doc talks about configuring the mbean name via configuration property, but then I need to enter the name in server UI, which isn't a good solution for me.

Thanks!
-AM
Reply
0 Kudos
2 Replies
dougm_hyperic
VMware Employee
VMware Employee

There does need to be a plugin.xml that defines the service type for your mbean and which attributes are exposed as metrics. Once you have that, the auto-discovery plugin can be used to find multiple instances of a given mbean.

If your beans are of the same type, you don't need to enter anything in the UI. The short-story the docs attempt to tell:

1) OBJECT_NAME defines the pattern:

<property name="OBJECT_NAME" value="MyCompany:name=*"/>

2) service defines a config option for the 'name' attribute:

<config>
<option name="name" description="MBean name"/>
<config>

3) service enables auto-discovery:

<plugin type="autoinventory"/>
Reply
0 Kudos
djinn_fr
Contributor
Contributor

Hi,

I am trying to exactly do that.

I don't understand completly the answer.
Please, is it possible to get a full example with autodiscovery ?

Thanks
Reply
0 Kudos