1.8. Monitor Instances with JMX


Monitoring with JConsole

All of the containers in the fabric have JMX enabled by default. To monitor a Fabric Container with JConsole, proceed as follows:
  1. In the local container, use the fabric:container-list console command to obtain the JMX connection URLs for all of the containers, as follows:
    JBossFuse:karaf@root> fabric:container-list -v
    [id]                 [version] [alive] [profiles]                      [ssh url]                     
     [jmx url]                                                                                  [provision status]
    mqserver1            1.0       true    mq                              ec2-184-72-214-117.compute-1.amazonaws.com:8101
     service:jmx:rmi://ec2-184-72-214-117.compute-1.amazonaws.com:44444/jndi/rmi://ec2-184-72-214-117.compute-1.amazonaws.com:1099/karaf-mqserver1 success
    mqserver2            1.0       true    mq                              ec2-50-19-15-210.compute-1.amazonaws.com:8101
     service:jmx:rmi://ec2-50-19-15-210.compute-1.amazonaws.com:44444/jndi/rmi://ec2-50-19-15-210.compute-1.amazonaws.com:1099/karaf-mqserver2 success
    registry             1.0       true    fabric, fabric-ensemble-0000-1  ec2-50-19-18-91.compute-1.amazonaws.com:8101
     service:jmx:rmi://ec2-50-19-18-91.compute-1.amazonaws.com:44444/jndi/rmi://ec2-50-19-18-91.compute-1.amazonaws.com:1099/karaf-registry success
    Error executing command: java.lang.RuntimeException: org.apache.zookeeper.KeeperException$NoNodeException: KeeperErrorCode = NoNode for /fabric/registry/containers/config/root/publichostname
  2. In an O/S command prompt, enter the following command to start up JConsole:
    > jconsole
  3. Copy one of the (rather long) JMX connection URLs from step 1 and paste it into the Remote Console text field of the JConsole: New Connection dialog. In the Username field, type admin; and in the Password field, type admin. Click Connect.
  4. JConsole now establishes a JMX connection to the cloud container. Click on the MBeans tab to explore the status of applications running in the container.

EC2 firewall configuration

Fabric automatically configures the EC2 firewall to let JMX connections through. It should not be necessary to make any modifications to the firewall configuration.
Red Hat logoGithubRedditYoutubeTwitter

Learn

Try, buy, & sell

Communities

About Red Hat Documentation

We help Red Hat users innovate and achieve their goals with our products and services with content they can trust.

Making open source more inclusive

Red Hat is committed to replacing problematic language in our code, documentation, and web properties. For more details, see the Red Hat Blog.

About Red Hat

We deliver hardened solutions that make it easier for enterprises to work across platforms and environments, from the core datacenter to the network edge.

© 2024 Red Hat, Inc.