Managing Access Rules
This section describes how to add, view, and delete access rules.
Prerequisites
- You have created a log group and log stream. For details, see Creating Log Groups and Log Streams. You can also directly create them on the Add Access Rule page.
- You have created a cluster, namespace, and workload by referring to Cloud Container Engine User Guide and Cloud Container Instance User Guide and also configured a container log collection path.
Adding Access Rules
To map the logs of CCE, CCI, or custom clusters in AOM to LTS, perform the following steps:
- Log in to the AOM console. In the navigation pane, choose Log > Access LTS.
- Click Add Access Rule.
- Select an access type. Access by Namespace, Access by Workload, or Automatic Mapping are available.
- Access by Namespace: All logs of the selected namespace are connected to the specified log stream.
- Rule Name: Enter a custom rule name.
- Cluster: Select a cluster from the drop-down list.
- Namespace: Select a namespace from the drop-down list.
- Workload: Retain the default value All.
- Container Name: Select a container from the drop-down list box.
- Set an access rule.
- Access all logs: If you select this option, select a log group and log stream.
- Specify log paths: If you select this option, specify a log path and then select a log group and log stream.
- Access by Workload: Logs of the selected workload are connected to the specified log stream.
- Rule Name: Enter a custom rule name.
- Cluster: Select a cluster from the drop-down list.
- Namespace: Select a namespace from the drop-down list.
- Workload: Select one or more workloads from the drop-down list.
- Container Name: Select a container from the drop-down list box.
- Set an access rule.
- Access all logs: If you select this option, select a log group and log stream.
- Specify log paths: If you select this option, specify a log path and then select a log group and log stream.
- Automatic Mapping: Workload logs are automatically connected to the generated log streams with the same names as the workloads.
- Rule Name: Enter a custom rule name, for example, test. Cluster: Select a cluster from the drop-down list.
- Namespace: Select a namespace from the drop-down list.
- Workload: Select one or more workloads from the drop-down list.
If you select one workload, the rule name is changed to Custom rule name_0 after the rule is created, for example, test_0. If you select multiple workloads, the rule names are changed to Custom rule name_0, Custom rule name_1, and so on, such as test_0 and test_1.
- Access Rule: Select a log group. A log stream with the same name as the workload is automatically generated. By default, all logs of the selected workload are connected.
- Access by Namespace: All logs of the selected namespace are connected to the specified log stream.
Viewing and Managing Access Rules
On the Access LTS page, you can search for, view, edit, and delete access rules.
- Search Click the search box, select a search dimension, for example, Workload, and then select options under this dimension. You can also directly enter a keyword in the search box. In this case, the system searches for information based on access rule names by default.Figure 1 Selecting a search dimension
- View
You can view the created access rules on the Access LTS page. Click
in the upper right corner of the search box to select the fields to display. Click a log group name in the Log Group column to go to the log group details page on the LTS console. - Edit
On the Access LTS page, click
in the Operation column to edit an access rule. For details about the impact of modifying an access rule, see Modifying a Mapping. - Delete
On the Access LTS page, click
in the Operation column to delete an access rule. You can also select and delete multiple rules in batches.Figure 2 Deleting access rules in batches
Deleted access rules or mapped log streams cannot be recovered. Exercise caution when performing this operation. For details about the impact of deleting an access rule, see Deleting a Mapping.
Last Article: Overview
Next Article: Container Log Collection Configuration
Did this article solve your problem?
Thank you for your score!Your feedback would help us improve the website.