Learn about how to install the Unified Monitoring Agent, whether for new instances, existing instances, or instances created from custom images, and non-Oracle Cloud Infrastructure instances.
On new Oracle Cloud Infrastructure instances with supported operating systems, you can enable the agent directly during creation time. For both new and existing instances with supported operating systems, the Custom Logs Monitoring plugin must be enabled, and all plugins must be running. See Available Plugins for more information.
Manual Installation
If you already have the Custom Logs Monitoring plugin enabled, then your instance will be automatically patched to install the agent. Otherwise, you can use the following manual installation instructions.
Run the following command to get more details on the latest agent download versions for each OS:
Command
CopyTry It
oci os object get --namespace axmjwnk4dzjv --bucket-name unified-monitoring-agent-config --name versionInfoV2.yml --file versionInfoV2.yml --profile <profile-name> --auth security_token
The command downloads the versionInfoV2.yml file with the following contents:
Use the following command to download the non-FIPS or FIPS-enabled agent for your Linux OS, while replacing <bucket>, <name>, and <file> for the particular OS version:
Command
CopyTry It
oci os object get --namespace axmjwnk4dzjv --bucket-name <bucket> --name <name> --file <file> --profile OC1 --auth security_token
Use the following command to download the non-FIPS or FIPS-enabled agent for Windows Server 2012, 2016, 2019 and 2022, while replacing <name>, and <file> for the particular Windows OS version:
Command
CopyTry It
oci os object get --namespace axmjwnk4dzjv --bucket-name unified-monitoring-agent-win-bucket --name <name> --file <file> --profile OC1 --auth security_token
Configure user API keys for the instance you're running on. To generate the user API key, follow the instructions described in How to Generate an API Signing Key.
(Linux). Place the ".oci" directory and its contents under /etc/unified-monitoring-agent.
(Windows). For Windows, some steps differ, so ensure to follow the appropriate steps. Create the ".oci" folder and its contents in the directory C:\oracle_unified_agent.
Create a Dynamic Group with a matching rule targeting database resources, and apply it to your agent configuration. For more information, see About Dynamic Groups. Select a dynamic group from the Group list matching the rule for a resource of any resource type (database, dbsystem, cloudvmcluster).
ALL {resource.type = <resource-type>, resource.id = <resource-ocid>}
For example: ALL {resource.type = 'database', resource.id = 'ocid1.database.oc1.phx.<unique_ID>'}.
Create a policy granting the dynamic group you created access to the Logging service.
Allow dynamic-group <dynamic-group> to use log-content in compartment <compartment-name>
For example: Allow dynamic-group linuxdbvm to use log-content in compartment <compartment-name>.
Create a file in the /etc/resource_principal_env directory on the host using the following format.
OCI_RESOURCE_PRINCIPAL_VERSION=1.1
OCI_RESOURCE_PRINCIPAL_RPT_ENDPOINT=https://database.<oci_region>.oraclecloud.com //The endpoint for retrieving the resource principal token
OCI_RESOURCE_PRINCIPAL_PRIVATE_PEM=/etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem //PKI-provisioned certificate
OCI_RESOURCE_PRINCIPAL_REGION=<oci_region> // OCI region
OCI_RESOURCE_PRINCIPAL_RPST_ENDPOINT=https://auth.<oci_region>.oraclecloud.com //The endpoint for retrieving the resource principal session token
The following is an example for the Oracle Exadata Database service in the us-phoenix-1 region: