With the OCI Log ingest function, OCI users can stream their logs directly into Dynatrace for troubleshooting and root cause analysis using Davis® AI.
This OCI function was created to work alongside the Oracle Cloud Infrastructure extension found on the Dynatrace Hub.
Note: These actions must be done by a OCI tenancy administrator using the Oracle Cloud Shell or Oracle Code Editor.
OCI logs
- Login to the OCI portal and search for Log Groups
- Select your compartment on the left side and click Create Log Group - A side panel will open.
- Enter your desired name, description and any tags.
- Click Create to create your new Log Group.
- In the search bar, search for and select Logs.
- Select either Create custom log or Enable service log. Enter a name and select the log group you just created.
- Click Create custom log or Enable log to begin sending logs to your log group.
OCI function
-
Select an existing application or click Create Application and give it a name.
-
Create a new OCI function within your application and give it a name.
-
We recommend using the Oracle Code Editor to create your custom function.
-
Once the Code Editor is open, select Create from code repository and enter a function name and the url to the Github repository.
-
Edit the
func.yaml
file, updating theDYNATRACE_TENANT
andDYNATRACE_API_KEY
environment variables with the url to your Dynatrace tenant and an api token with thelogs.ingest
scope. -
Follow the instructions on the Getting started page under your application. Use the cloned repository instead of the example function in the instructions. This can be done in the code editor's terminal instead of a separate cloud shell.
-
After completeing the commands in the Getting started tab, you should see your image under the Container registry page.
OCI connector
- In the OCI portal, search for Connectors
- Click Create Connector, give it a name and description.
- Select Logging as the source and Functions as the target.
- Under Configure source choose the log group and specific log that you want to stream to Dynatrace.
- Under Configure target select your application and function created in the previous steps.
- If you are prompted to create any policies, click on Create.
- Finally click Create at the bottom of the panel, now you have a connector for streaming logs into Dynatrace.
In the Dynatrace menu, go to Logs and Events, to look for OCI logs by filtering by cloud.provider: oci
.