Creating a Connector with a Logging Source
Create a connector in Connector Hub to transfer log data from the Logging service to a target service.
For more information about the Logging service, see Logging.
A connector that's defined with a Logging source and optional task supports all targets. For an example of the Connector Hub workflow, see Overview of Connector Hub. For an example of a connector that uses Logging as the source, with a Functions task, see Scenario: Sending Log Data to an Autonomous Database.
Retention Period: Logging Source
The retention period for the Logging source in Connector Hub is 24 hours. For more information about delivery, see Delivery Details.
If the first run of a new connector is successful, then it moves log data from the connector's creation time. If the first run fails (such as with missing policies), then after resolution the connector moves log data from the connector creation time or 24 hours before the current time, whichever is later.
Each later run moves the next log data. If a later run fails and resolution occurs within the 24-hour retention period, then the connector moves the next log data. If a later run fails and resolution occurs outside the 24-hour retention period, then the connector moves the latest log data, and any data generated between the failed run and that latest log data isn't delivered.
Query Reference
To review supported queries for filtering source logs, see Log Query Reference for Connector Hub.
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 Logging source:
oci sch service-connector create --display-name "<display_name>" --compartment-id <compartment_OCID> --source [<logging_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 Logging source, populate
source
in the request (CreateServiceConnectorDetails) with logging details. For an example, see LoggingSourceDetails.
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.