メインコンテンツまでスキップ

Application Log Query

Cloud ZCP supports OpenSearch Stack as a logging tool. You can access stored log data by clicking the Logging menu.

Access OpenSearch Dashboards

You can access Kibana through the Logging menu within the ZCP Console.

For System Administrators, the Logging menu provides full access. This full access for System Administrators likely includes rights to menus within OpenSearch Dashboards such as "Security" for managing multi-cluster log data access, roles, users, permissions, and tenants, based on prior conversation although this specific menu access is not explicitly detailed in the provided OpenSearch Dashboards excerpts.

For Project Users, access to OpenSearch Dashboards menus (like Discover, Dashboard, Visualize) is determined by their Project Role (Admin/Editor/Viewer).

Change Tenants

備考

Before querying logs, you need to change the tenant

In OpenSearch Dashboards, Tenants are categorized by the project units created in the ZCP web console.

Available tenant types include:

  • Global: A public tenant accessible to all users
  • Private: A tenant accessible only to the logged-in user
  • Choose from custom: Allows you to select custom tenants that the logged-in account has access to (the Projects the account can access)

To change Tenant, follow the steps below:

  1. Click the icon in the top-right corner of OpenSearch Dashboards to display information and related menus for the logged-in account.

  2. From these menus, select the Switch tenants menu to change the tenant.

  3. In the pop-up window, select Choose from custom from the available tenant types:

  1. Choose the project that you want to view the query log from the dropdown list.

  2. Click Confirm to change the tenant.

After successfully changing the tenant, you will have access to the log indexes and data related to the selected project.

Discover

This screen allows you to query logs. You can check the logs of the application deployed in the previous step. (Reference: Discover Guide)

Log storage indexes are created per project.

  • Search: Enter a search term to filter logs within the specified time range.
    • You can search for specific words (e.g., error) or logs containing specific key-value pairs.
  • Filter: Filter and view data based on the fields available in Available fields.
  • You can specify a time range to query logs.
  • To add fields to the summary panel on the right, hover over the desired field in Available fields on the left, and click the "Add" button.

Index Policies

Index Policies are used for the logical management of indexes within Kibana. They enable you to create, modify, and delete policies that manage indexes, and these policies specify the target indexes that form the criteria for searching within Kibana.

For System Administrators, they have Full Control over Index Management and Stack Management, which includes the ability to manage index patterns and policies.

ヒント

Project Users typically do not have permission to create index patterns. System Administrators possess the necessary full control to create index patterns.

An index pattern is a key component of index policies that defines the scope of logs for querying. To create an index pattern:

  1. Click the Create index pattern button:

  1. Pattern the indexes you want to enclose

  2. Set the time to be the basis for displaying the logs you are searching for

  3. Click the Create index pattern button to finalize the creation.

After you create the index pattern, you’ll be able to view the mapping for the matching indexes. The table displays a list of fields, showing their data types and properties. The following image provides an example. (Reference: Index Patterns)