Skip to content

OCI Function for streaming metrics from OCI into Dynatrace

Notifications You must be signed in to change notification settings

Moviri/oci-metric-ingestion

Repository files navigation

Setup the Application & OCI Function

  1. Login to the OCI portal and navigate to Applications and click on 'Create Application'.
  2. Enter a name for the application and select a subnet then click on 'Create' alt text
  3. 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. alt text
  4. In the cloud shell clone the OCI Function from this github repository and enter the directory. alt text
  5. Edit the func.yaml file using your preferred text editor (vim or nano) and set the value of DYNATRACE_API_KEY to an API token that has the metrics.ingest scope and set the value of DYNATRACE_TENANT to your Dynatrace tenant URL. alt text
    • 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.
  6. Save and exit the text editor. Now deploy the function using the command fn -v deploy --app <application name> alt text If the deployment succeeded then you should see the image in your OCI container registry. alt text

Create an OCI Connector

  1. Navigate to the Connector Hub and click on 'Create connector'. alt text
  2. Enter a name for the connector and select 'Monitoring' as the Source and 'Functions' as the Target alt text
  3. Select the compartments and namespaces you want to pull metrics from. alt text
  4. Scroll past Configure task and choose the compartment, application and function that you just created in the previous setps. alt text
  5. Finally click 'Create'
  6. Verify the metrics are getting ingested into Dynatrace. alt text

Debugging

If you are running into issues getting the connector to work, go to the application and enable Function Invocation Logs. alt text Any errors will be logged here as well as some information about when the function has been run. alt text

About

OCI Function for streaming metrics from OCI into Dynatrace

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages