Creating a Log Group
Create a log group that functions as a logical container for organizing logs. You must create a log group before you can create a log.
- Open the navigation menu and click Observability & Management. Under Logging, click Log Groups.
- Under List scope, select a compartment you have permission to work in.
- Click Create Log Group.
- In the Create Log Group panel, enter the following values:
- Compartment: The compartment in which you want to create the log group. This field is already filled in based on your compartment choice in step 2.
-
Name: A name for this log group. The first character of a log group name must be a letter. For more information, see Log and Log Group Names. Avoid entering confidential information.
- Description: A friendly description.
- Optionally, enter tagging information.
-
Click Create.
The log group is created and the details page for it opens. On this page, you can perform the following actions:
- Edit the group
- Move the group to a different compartment
- Add tags
- Delete the log group
- View log group information and tags
- View log group resources (explore the log group, view the logs included in the log group, create custom or service logs, and view metrics)
The Metrics resource in a log group detail page functions the same as in a log detail page. See Getting a Log's Details for more information.
Use the oci logging log-group create command and required parameters to create a log group:
oci logging log-group create --compartment-id compartment_ocid --display-name display_name [OPTIONS]
For a complete list of parameters and variable options for CLI commands, see the Command Line Reference.
Run the CreateLogGroup operation to create a log group.