4 Replies Latest reply on Jun 18, 2014 5:58 PM by raylite3

    Autogrouping of application mbeans

    raylite3 Apprentice



      My application.war exposes multiple mbeans with names like 'com.example:beantype=X,module=Y,name=Z'. I am able to create a agent plugin, a JMX server and discover these mbeans. But they don't get autogrouped. I am guessing it's because of the name? Do I need a attribute like 'category=A' in the object name ?



        • 1. Re: Autogrouping of application mbeans
          Thomas Segismont Expert

          Auto groups get created for resources:

          • of the same type
          • children of the same parent


          Can you post your plugin descriptor?

          • 2. Re: Re: Autogrouping of application mbeans
            raylite3 Apprentice

            Thanks, here is one such plugin that doesn't autogroup the mbeans it discovers.

            • 3. Re: Re: Re: Autogrouping of application mbeans
              Thomas Segismont Expert

              Your plugin descriptor is ok: there is only one resource type definition so resources of this type discovered under the same parent should autogroup.


              Consider the "Garbage Collector" type defined in the JMX plugin descriptor.


               <service name="Garbage Collector" discovery="MBeanResourceDiscoveryComponent" class="MBeanResourceComponent"
                        description="A garbage collector that collects one or more memory pool.">
                     <c:simple-property name="objectName" readOnly="true" default="java.lang:type=GarbageCollector,name=%name%"/>
                     <c:simple-property name="nameTemplate" readOnly="true" default="{name}"/>
                     <c:simple-property name="descriptionTemplate" readOnly="true" default="The {name} Garbage Collector for this VM."/>
                     <c:simple-property name="name" type="string" readOnly="true" description="The garbage collector's name"/>
                  <metric property="CollectionCount"
                          description="Number of collections"/>
                  <metric property="CollectionTime"
                          description="The amount of time spent in collection"
                  <metric property="MemoryPoolNames"
                          description="The names of the memory pools used by this type of garbage collector"


              Here's how these services appear under the JVM resource of the RHQ Agent:


              GC Resources Autogroup.png


              An autogroup is created, named "Garbage Collectors".


              Would you mind posting a similar screenshot for you Cache services?



              • 4. Re: Re: Re: Re: Autogrouping of application mbeans
                raylite3 Apprentice

                Here's what happens to the mbeans it discovers, it doesn't group them.