- Login to the OCI portal and navigate to Applications and click on 'Create Application'.
- Enter a name for the application and select a subnet then click on 'Create'
- Once the application is created you will be rediected to the Getting started page. Launch the cloud shell and follow the instructions under Setup fn CLI on Cloud Shell.
- In the cloud shell clone the OCI Function from this github repository and enter the directory.
- Edit the
func.yaml
file using your preferred text editor (vim
ornano
) and set the value ofDYNATRACE_API_KEY
to an API token that has themetrics.ingest
scope and set the value ofDYNATRACE_TENANT
to your Dynatrace tenant URL.- Set the configuration option
IMPORT_ALL_METRICS
if you want to import metrics from a namespace that is not supported by the OCI extension. These metrics will not have metadata associated with them.
- Set the configuration option
- Save and exit the text editor. Now deploy the function using the command
fn -v deploy --app <application name>
If the deployment succeeded then you should see the image in your OCI container registry.
- Navigate to the Connector Hub and click on 'Create connector'.
- Enter a name for the connector and select 'Monitoring' as the Source and 'Functions' as the Target
- Select the compartments and namespaces you want to pull metrics from.
- Scroll past Configure task and choose the compartment, application and function that you just created in the previous setps.
- Finally click 'Create'
- Verify the metrics are getting ingested into Dynatrace.
If you are running into issues getting the connector to work, go to the application and enable Function Invocation Logs. Any errors will be logged here as well as some information about when the function has been run.