0 Replies Latest reply on May 17, 2017 5:07 PM by milspec

    Can I log jmx mbean stats in wildfly? (like "jvm-monitor-service.xml" in earlier jboss )

    milspec

      Hi all,

       

      We used jvm-monitor-service.xml and other such "monitoring service xml" files in earlier jboss (4.2.2.GA) to log statistics: jvm stats, number of threads, db pool stats, etc.

       

      These monitoring service queried mbeans and logged output to a file.

       

      Can I similarly query/log stats in wildfly?

       

      thanks in advance

       

      will

       

      Example jvm monitoring xml

       

      <server>

       

         <mbean code="org.jboss.services.loggingmonitor.LoggingMonitor"

                name="jboss.monitor:type=LoggingMonitor,name=ThreadPoolMonitor">

            <attribute name="Filename">${jboss.server.home.dir}/log/threads.log</attribute>

            <attribute name="AppendToFile">true</attribute>

            <attribute name="RolloverPeriod">MONTH</attribute>

            <attribute name="MonitorPeriod">10000</attribute>

           

             <attribute name="MonitoredObjects">

                <configuration>

      <!--

         Commented out as this mbean has not proved too helpful

                   <monitoredmbean name="jboss.system:service=ThreadPool" logger="threadpool.info">

                      <attribute>QueueSize</attribute>

                      <attribute>MaximumQueueSize</attribute>               

                   </monitoredmbean>

      -->            

                   <monitoredmbean name="jboss.web:type=ThreadPool,name=http-0.0.0.0-@HTTP_PORT_INTERNAL@" logger="tomcat.info">

                      <attribute>currentThreadsBusy</attribute>

                      <attribute>currentThreadCount</attribute>

                      <attribute>maxThreads</attribute>               

                   </monitoredmbean>

                </configuration>         

             </attribute>

         </mbean>  

      </server>