Oracle by Example brandingInstalling Oracle Application Performance Management Agent on a JBoss Wildfly Server

section 0Before You Begin

This 10 minute tutorial shows you how to install the APM Java Agent on a JBoss Wildfly Server to monitor the Java applications that are running on the application server.

What Do You Need?

  • A valid Oracle Cloud account, an Oracle Management Cloud instance, and OMC Administrator role credentials.
  • A host with Oracle Linux 6.7
  • A running JBoss Wildfly Server version 9.0.2
  • JDK version 1.7 or above
  • A Java web application on the host. For example: benefits.war

section 1Prerequisites

Ensure that the following prerequisites are met:

  • The JBoss Server user should have read and write permissions to the directories that host the APM Java Agent, as well as the JBOSS Home.
  • Generate or download a registration key.
  • Download and save a Java web application on the host. For example: benefits.war. This is a sample Java web application archive.

section 2Downloading and Installing the APM Agent in a JBoss Server

  1. Log in as administrator to Oracle Management Cloud and click Administration > Agents > Downloads.
  2. Download and extract the APM Java Agent zip files in a new folder.
  3. Run chmod with the provisioning script
    chmod +x
  4. Run ProvisionApmJavaAsAgent with the following parameters:
  5. $ ./ -d $JBOSS_HOME -no-wallet

    -d is the absolute path of the home directory of the WebLogic Server domain.

    -no-wallet means that you will not use Oracle Wallet for this installation.

  6. When prompted, provide the value of the registration key that you've created or downloaded earlier.
  7. This image shows the installation progress of the APM Agent Installation.
    Description of the illustration
  8. Press y to confirm and install the agent.

section 3Provisioning the APM Java Agent in a JBoss Wildfly Server

  1. Navigate to $JBOSS_HOME/bin:
    $ cd $JBOSS_HOME/bin
  2. Make a copy of standalone.conf:
  3. $ cp standalone.conf standalone.conf.orig
  4. Open standalone.conf with your text editor. 

  5. Scroll to the end of the standalone.conf file and add the following Java options:
    JAVA_OPTS="$JAVA_OPTS -javaagent:$JBOSS_HOME/apmagent/lib/system/ApmAgentInstrumentation.jar"
  7. Stop and restart the JBoss server:
    $ ./ -c :shutdown                        
    $ nohup ./ -b> startup.log &
  8. Navigate to the JBoss Wildfly administration console and login with the required user credentials.
    The default URL is: localhost:9990/console.
  9. In Deployments, click Start.
  10. This image shows the JBoss' main page with a focus in the Deployment area.
    Description of the illustration
  11. Click Add.
  12. Select Upload a new deployment.
  13. This image shows JBoss' add a new deployment page with the 'Upload a new deployment' radio button selected.
    Description of the illustration
  14. Select the benefits.war file and upload it.
  15. This image shows JBoss > Add a new deployment page and the file 'benefits.war' selected.
    Description of the illustration
    The benefits.war file appears in the deployed applications screen.

section 4Verifying the APM Java Agent Installation

  1. Log in to the Oracle Management Cloud home page.
  2. Click Administration.
  3. This image shows the main page for Oracle Management Cloud, with the Administration page highlighted.
    Description of the illustration
  4. Click Agents and then click APM Agents.

    The status of the APM Java agent is displayed.

  5. This image shows the status of the APM Java Agent which you installed.
    Description of the illustration

more informationWant to Learn More?