Skip to content

Oracle Cloud Infrastructure Metrics source (OCIMetrics)

This event source collects metrics data from Oracle Cloud.

With tmctl:

Work in progress

This component is not yet available with tmctl.


# tmctl create source ocimetrics --oracleApiPrivateKey <oracleApiPrivateKey> --oracleApiPrivateKeyPassphrase <oracleApiPrivateKeyPassphrase> --oracleApiPrivateKeyFingerprint <oracleApiPrivateKeyFingerprint> --oracleTenancy <oracleTenancy> --oracleUser <oracleUser> --oracleRegion <oracleRegion> --metrics <TODO>
``` -->

On Kubernetes:

kind: OCIMetricsSource
  name: sample
  # required to interact with the Oracle Cloud API
    value: |-
      -----BEGIN RSA PRIVATE KEY-----
      -----END RSA PRIVATE KEY-----
    value: replace-me
    value: 5c:75:c4:67:92:a9:46:2a:01:5b:73:54:6a:b2:74:7d

  oracleTenancy: ocid1.tenancy.oc1..aaaaaaaaswreplaceme
  oracleUser: ocid1.user.oc1..aaaaaaaaqlocaluser
  oracleRegion: us-ashburn-1

  # required to enable metrics
  - name: cpuUtilization
    metricsNamespace: oci_computeagent
    metricsQuery: CPUUtilization[1m].mean()

  # optional. default to 5m
  metricsPollingFrequency: 3m

      kind: RedisBroker
      name: triggermesh

For the metrics specific information: - metricsNamespacecan take values such as oci_computeagent or oci_vcn - metricsQuery is based on MQL

For details on how to write a query, consult the Oracle Cloud Monitoring Overview

Events produced have the following attributes:

  • type
  • source is of the form ocimetrics/<namespace>/<source-name> where namespace is your current namespace and source-name is the name specified during creation of the source.
  • Schema of the data attribute:

See the Kubernetes object reference for more details.


  • Oracle Cloud Account
  • Oracle Cloud Infrastructure (OCI)
  • Oracle Cloud Secret

Oracle Cloud Account

An Oracle Cloud account is required.

Oracle Cloud Infrastructure (OCI)

The Oracle Cloud account needs to have permissions to inspect and read metrics for the Oracle Cloud Infrastructure (OCI) compartment.

For additional information on how to create an API key and associate it with your Oracle Cloud user, go to Oracle's Developer Documentation

Oracle Cloud Secret

Three pieces of information are required for the Oracle Cloud: 1. API Private Key used for signing the request 1. API Private Key passphrase to decrypt the key 1. API Key's fingerprint to identify which key to use on the Oracle Cloud end