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.
Retention Period: Monitoring Source
The retention period for the Monitoring source in Connector Hub is 24 hours. For more information about delivery, see Delivery Details.
Format of Data Received from Monitoring
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.
The creation process begins, and its progress is displayed. On completion, the connector's details page opens. Use the oci sch service-connector create command and required parameters to create a connector with a Monitoring source:
oci sch service-connector create --display-name "<display_name>" --compartment-id <compartment_OCID> --source [<metrics_source_in_JSON>] --target [<target_in_JSON>]
For a complete list of parameters and values for CLI commands, see the CLI Command 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.
Confirm That the New Connector Moves Data
After you create the connector, confirm that it's moving data.
- Enable logs for the connector to get details on data flow.
- Check for expected results at the target service.
Confirming that data is moved helps you avoid automatic deactivation, which happens when a connector fails for a long time.