OCI Linux

Follow these steps if your host is a Compute Instance on Oracle Cloud Infrastructure (OCI). Configure Oracle Cloud Agent if your host is present in the same tenancy and region, otherwise follow On-premises Linux instructions.

Before you begin, review the prerequisites and the overview of the steps.

Prerequisites:

Steps

  1. Enable the Management Agent and Java Management Service plug-ins on your compute instance's Oracle Cloud Agent, if not enabled yet, as described in Enable Management Agents Using the Console.
  2. Deploy the service plug-in Java Usage Tracking as described in Deploy a Plug-in Using the Agents Page.
  3. To associate the management agent with your fleet, add a tag to the management agent with the following details:
    • Tag namespace: jms
    • Tag key: fleet_ocid
    • Tag value: the OCID of the existing fleet
    Note

    The agent is installed with MACS default telemetry frequency.
  4. Configure Java Usage Tracker using the JMS service plug-in setup script, as follows:

    Option 1: Generate usage tracker with standard functionality.

    Run the following commands.

    VERSION=$(sudo ls /var/lib/oracle-cloud-agent/plugins/oci-managementagent/polaris/agent_inst/config/destinations/OCI/services/jms)
    sudo bash /var/lib/oracle-cloud-agent/plugins/oci-managementagent/polaris/agent_inst/config/destinations/OCI/services/jms/${VERSION}/scripts/setup.sh --force
    This script creates the file /etc/oracle/java/usagetracker.properties with appropriate permissions. By default, the file contains the following lines:
    com.oracle.usagetracker.logToFile = /var/log/java/usagetracker.log
    com.oracle.usagetracker.additionalProperties = java.runtime.name
    If successful, you should see a message in the console similar to
    /var/log/java created
    /etc/oracle/java/usagetracker.properties created

    Option 2: Generate usage tracker with additional functionality to collect the user.name property for better identification of applications running in Application Servers like WebLogic and Tomcat.

    Run the following commands:
    VERSION=$(sudo ls /var/lib/oracle-cloud-agent/plugins/oci-managementagent/polaris/agent_inst/config/destinations/OCI/services/jms)
    sudo bash /var/lib/oracle-cloud-agent/plugins/oci-managementagent/polaris/agent_inst/config/destinations/OCI/services/jms/${VERSION}/scripts/setup.sh --force --enable-user-name
    If successful, you should see a message in the console similar to:
    /var/log/java created
    /etc/oracle/java/usagetracker.properties created

    For more information, see Enabling and Configuring Java Usage Tracker.

  5. Verify the installation, as described in Verify Management Agents on Compute Instances.
  6. Optional. Specify how frequently the management agent will report data to JMS Fleets and which file system paths on the host will be scanned to discover Java Runtime installations. See Modifying a Management Agent Settings.
The log files are located in the /var/log/oracle-cloud-agent/plugins/oci-jms/ directory.