2 Replies Latest reply on Oct 2, 2012 3:38 AM by Yves Martin

    Monitoring the JBoss 7.1 JVM in RHQ 4.4.0

    gibsonc Newbie

      Hi all

       

      I notice that after discovery, the underlying JVM and associated metrics are nowhere to be found under the expanded JBoss AS object. I would like to set up alerts for low heap and open files etc.

      From what I understand it is not necessary to enable remote JMX on the JVM and in fact on discovery this will be specifically excluded by the RHQ agent anyway as the plugin is supposed to take care of it - besides the fact that JBoss 7 will not start up with remote JMX enabled anyway - not without a few hacks.

       

      I saw this workaround - https://community.jboss.org/thread/203402?tstart=0 but is this the way to do it 'officially' or am I missing something that needs to be added to the startup options of the instance?

        • 1. Re: Monitoring the JBoss 7.1 JVM in RHQ 4.4.0
          Yves Martin Newbie

          Hello,

           

          According to RHQ documentation, the standard way to fully monitor JBoss 7 is to deploy modules: https://docs.jboss.org/author/display/RHQ/JBoss+AS+7.x+Product+Configuration

           

          I have followed that documentation to get monitoring of JBoss 7.0.1 in domain mode but either this version is too old, or else there is a bug or documentation is lacking... My JBoss Host controller refuses to start then with the following error message:

           

          0:53:06,633 INFO  [org.jboss.modules] (main) JBoss Modules version 1.0.1.GA

          10:53:06,910 INFO  [org.jboss.msc] (main) JBoss MSC version 1.0.0.GA

          10:53:07,173 INFO  [org.jboss.remoting] (MSC service thread 1-2) JBoss Remoting version 3.2.0.Beta2

          10:53:07,206 INFO  [org.xnio] (MSC service thread 1-2) XNIO Version 3.0.0.Beta3

          10:53:07,247 INFO  [org.xnio.nio] (MSC service thread 1-2) XNIO NIO Implementation Version 3.0.0.Beta3

          10:53:07,753 ERROR [stderr] (Controller Boot Thread) Exception in thread "Controller Boot Thread" java.util.ServiceConfigurationError: org.jboss.as.controller.Extension: Provider org.rhq.helpers.rtfilter.subsystem.RtFilterExtension could not be instantiated: java.lang.NoClassDefFoundError: org/jboss/as/controller/ResourceDefinition

          10:53:07,753 ERROR [stderr] (Controller Boot Thread)    at java.util.ServiceLoader.fail(ServiceLoader.java:207)

          10:53:07,753 ERROR [stderr] (Controller Boot Thread)    at java.util.ServiceLoader.access$100(ServiceLoader.java:164)

          10:53:07,754 ERROR [stderr] (Controller Boot Thread)    at java.util.ServiceLoader$LazyIterator.next(ServiceLoader.java:353)

          10:53:07,754 ERROR [stderr] (Controller Boot Thread)    at java.util.ServiceLoader$1.next(ServiceLoader.java:421)

          10:53:07,754 ERROR [stderr] (Controller Boot Thread)    at org.jboss.as.controller.parsing.CommonXml.parseExtensions(CommonXml.java:319)

          10:53:07,754 ERROR [stderr] (Controller Boot Thread)    at org.jboss.as.controller.parsing.DomainXml.readDomainElement(DomainXml.java:180)

          10:53:07,754 ERROR [stderr] (Controller Boot Thread)    at org.jboss.as.controller.parsing.DomainXml.readElement(DomainXml.java:90)

          10:53:07,755 ERROR [stderr] (Controller Boot Thread)    at org.jboss.as.controller.parsing.DomainXml.readElement(DomainXml.java:82)

          10:53:07,755 ERROR [stderr] (Controller Boot Thread)    at org.jboss.staxmapper.XMLMapperImpl.processNested(XMLMapperImpl.java:100)

          10:53:07,755 ERROR [stderr] (Controller Boot Thread)    at org.jboss.staxmapper.XMLMapperImpl.parseDocument(XMLMapperImpl.java:59)

          10:53:07,755 ERROR [stderr] (Controller Boot Thread)    at org.jboss.as.controller.persistence.XmlConfigurationPersister.load(XmlConfigurationPersister.java:107)

          10:53:07,755 ERROR [stderr] (Controller Boot Thread)    at org.jboss.as.host.controller.DomainModelControllerService.boot(DomainModelControllerService.java:296)

          10:53:07,755 ERROR [stderr] (Controller Boot Thread)    at org.jboss.as.controller.AbstractControllerService$1.run(AbstractControllerService.java:83)

          10:53:07,756 ERROR [stderr] (Controller Boot Thread)    at java.lang.Thread.run(Thread.java:662)

          10:53:07,756 ERROR [stderr] (Controller Boot Thread) Caused by: java.lang.NoClassDefFoundError: org/jboss/as/controller/ResourceDefinition

          10:53:07,756 ERROR [stderr] (Controller Boot Thread)    at java.lang.Class.forName0(Native Method)

          10:53:07,756 ERROR [stderr] (Controller Boot Thread)    at java.lang.Class.forName(Class.java:247)

          10:53:07,756 ERROR [stderr] (Controller Boot Thread)    at java.util.ServiceLoader$LazyIterator.next(ServiceLoader.java:345)

          10:53:07,757 ERROR [stderr] (Controller Boot Thread)    ... 11 more

          10:53:07,757 ERROR [stderr] (Controller Boot Thread) Caused by: java.lang.ClassNotFoundException: org.jboss.as.controller.ResourceDefinition from [Module "org.rhq.helpers.rhq-rtfilter-subsystem:main" from local module loader @bc92535 (roots: /opt/jboss/modules)]

          10:53:07,757 ERROR [stderr] (Controller Boot Thread)    at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:191)

          10:53:07,757 ERROR [stderr] (Controller Boot Thread)    at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:358)

          10:53:07,758 ERROR [stderr] (Controller Boot Thread)    at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:330)

          10:53:07,758 ERROR [stderr] (Controller Boot Thread)    at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:307)

          10:53:07,758 ERROR [stderr] (Controller Boot Thread)    at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:101)

          10:53:07,763 ERROR [stderr] (Controller Boot Thread)    ... 14 more

          • 2. Re: Monitoring the JBoss 7.1 JVM in RHQ 4.4.0
            Yves Martin Newbie

            In fact RHQ "JBoss 7.x plugin" works with JBoss 7.1. I had no luck trying to use it with JBoss 7.0.