This topic describes how to query OBServer logs, OBProxy logs, and host logs in the OceanBase Cloud Platform (OCP) console.
Prerequisites
You have the read-only permission on the log query object.
Procedure
Log on to the OCP console.
In the left-side navigation pane, choose System Management > Log Search .
The Log Search page appears. Alternatively, you can go to this page from other entries. Note
If you do so, the system automatically sets the Object Scope and Log Type parameters based on the entry. The following entries are available:
In the upper-right corner of the Overview page of a cluster, click the More icon ( ... ) and select Download Logs .
In the OBServers list of the Overview page of a cluster, click the More icon (...) in the Actions column of the target OBServer and select Download Logs .
In the left-side navigation pane, click Hosts . In the host list, select multiple IP addresses. Click the Batch Download Logs button that appears in the lower-right corner of the page.
In the upper-right corner of the Overview page of an OBProxy cluster, click the More icon ( ... ) and select Download All Logs .
In the OBProxies list of the Overview page of an OBProxy cluster, find the target OBProxy cluster and click Download Logs in the Actions column.
On the Log Search page, set the search criteria described in the following table.

Criteria Description Time Range The default time range is last 1 hour. You can select a time range of last 5, 10, 15, or 30 minutes or last 24 hours from the left-side drop-down list, or specify a custom time range in the right-side box. Object Scope The scope for log query. This parameter is required. - Select an OceanBase cluster, an OBProxy cluster, or a host from the left-side drop-down list to specify the log query object.
- Select one or more servers of the specified object from the right-side drop-down list.
Log Type The log type and files. This parameter is required. For more information, see Log types. - Select OceanBase Database Logs, OBProxy Log, Host Logs, or OCP Agent Logs from the left-side drop-down list to specify the log type.
- Select one or more log files of the specified type from the right-side drop-down list.
Keyword The keywords that the logs to query contain. Negative Keywords The keywords that the logs to query cannot contain. Log Level The log level. Valid values: ERROR, WARN, INFO, and DEBUG. Click Query .
The query results are displayed in the lower part of the page.

In section ①, you can switch between severs to view their logs.
In section ②, you can switch between log files.
In section ③, you can click the Download Logs button.
You can download all logs meeting the specified criteria on the server.
Log types
The following table describes the log types.
| Log type | Description |
|---|---|
| OBServer Logs | All logs in the /log/ directory of the installation path. The log clearing strategy is determined by the value you specified for the ocp.agent.ob-cleaner.config parameter:
|
| OBProxy Logs | All logs in the /home/admin/logs/obproxy/log/ directory. |
| Host Logs | All message- files in the /var/log directory. |
| OCP Agent Logs | All logs in the /home/admin/ocp_agent/log/ directory. |