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

    Autogrouping of application mbeans

    raylite3

      Hi,

       

      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 ?

       

      Thanks,

        • 1. Re: Autogrouping of application mbeans
          tsegismont

          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

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

            • 3. Re: Re: Re: Autogrouping of application mbeans
              tsegismont

              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.">
              
                  <plugin-configuration>
                     <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"/>
                  </plugin-configuration>
              
                  <metric property="CollectionCount"
                          measurementType="trendsup"
                          displayType="summary"
                          description="Number of collections"/>
                  <metric property="CollectionTime"
                          measurementType="trendsup"
                          displayType="summary"
                          description="The amount of time spent in collection"
                          units="milliseconds"/>
                  <metric property="MemoryPoolNames"
                          description="The names of the memory pools used by this type of garbage collector"
                          displayType="summary"
                          dataType="trait"/>
               </service>
              
              </service>
              
              

               

              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?

               

              Thanks

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

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

                 

                jon_cache_mbean_ungrouped.png