Enable Management Agents on Compute Instances

When using a compute instance, you can use the Oracle Cloud Agent capabilities to enable the Management Agent plugin.

Before proceeding, confirm you have completed the prerequisites. For details, see Perform Prerequisites for Deploying Management Agents on Compute Instances.

Enable Management Agents

Management Agents can be enabled by using the OCI Console or Compute API.
Note

The Management Agent plugin on compute instances runs on the Java virtual machine (JVM). Starting March 2023, the Management Agent plugin is deployed with a Java runtime (JRE).

The Java runtime is always kept up-to-date as part of the Management Agent upgrade process in order to address newly discovered security vulnerabilities. After enabling the Management Agent plugin, it's important to run the latest version of the Management Agent plugin software by enabling automatic upgrades or manually invoking the upgrade operation periodically. For details, see Upgrade Management Agents on Compute Instances.

Enable Management Agents Using the Console

To see if the Management Agent plugin is enabled for an instance:
  1. Open the navigation menu and click Compute. Under Compute, click Instances.
  2. Click the instance that you're interested in.
  3. Click the Oracle Cloud Agent tab.

    The list of plugins is displayed.

  4. Toggle the Enabled switch for the Management Agent plugin.

For more information, see Managing Plugins Using the Console.

Enable Management Agents Using Compute API

For information about using the API, see REST APIs.

For information about SDKs, see Software Development Kits and Command Line Interface.

Use these API operations to manage the Management Agent as an Oracle Cloud Agent plugin:
  • LaunchInstance - enables or disables plugins, or stops all plugins, when you create an instance.

  • UpdateInstance - enables or disables individual plugins, and stops or starts all plugins, for an existing instance.

The following is an extract from the Java Sample found in the LaunchInstance or UpdateInstance API operations which allows the user to enable Management Agent during Launch or Update of the compute instance respectively:
... 
    .agentConfig(LaunchInstanceAgentConfigDetails.builder()
			.isMonitoringDisabled(false)
			.isManagementDisabled(true)
			.areAllPluginsDisabled(false)
			.pluginsConfig(new ArrayList<>(Arrays.asList(InstanceAgentPluginConfigDetails.builder()
					.name("Management Agent")   
					.desiredState(InstanceAgentPluginConfigDetails.DesiredState.Enabled).build()))).build())
...

Where .name("Management Agent") indicates it's for Management Agent plugin and .desiredState(InstanceAgentPluginConfigDetails.DesiredState.Enabled).build()))).build()) indicates to enable the Management Agent.

For more information, see Managing Plugins Using the API.