Creating a Connector with a Monitoring Source
Create a connector in Connector Hub to transfer metric data points from the Monitoring service to a target service.
For more information about the Monitoring service, see Monitoring.
A connector that's defined with a Monitoring source and (optional) function task supports the following targets: Functions, Object Storage, and Streaming. For an example of the Connector Hub workflow, see Overview of Connector Hub. For an example of a connector that uses Monitoring as the source, see Scenario: Sending Metrics to Object Storage.
The retention period for the Monitoring source in Connector Hub is 24 hours. For more information about delivery, see Delivery Details.
The metric data received from Monitoring is raw. (Contrast with aggregated data shown in metric charts.)
[
{
"namespace":"oci_computeagent",
"compartmentId":"ocid1.tenancy.oc1..exampleuniqueID",
"name":"DiskBytesRead",
"dimensions":{
"resourceId":"ocid1.instance.region1.phx.exampleuniqueID"
},
"metadata":{
"unit":"bytes"
}
},
"datapoints":[
{
"timestamp":"2022-03-10T22:19:00Z",
"value":10.4
},
{
"timestamp":"2022-03-10T22:20:00Z",
"value":11.3
}
]
]
The format of the data at the target depends on the target type.
Use the oci sch service-connector create command and required parameters to create a connector with a Monitoring source:
oci sch service-connector create [...] --source <monitoring_json_input>
For a complete list of flags and variable options for CLI commands, see the Command Line Reference.
Run the CreateServiceConnector operation to create a connector.
To create a connector with a Monitoring source, populate
source
in the request (CreateServiceConnectorDetails) with monitoring details. For an example, see MonitoringSourceDetails.