This topic describes how to query OBServer logs, OBProxy logs, and host logs in the OceanBase Cloud Platform (OCP) console.
Prerequisites
The logged-on user in the OCP console has 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.
In the upper-right corner of the Overview page for clusters, click the More icon ( ... ) and choose Download Logs .
In the OBServers list of the Overview page for clusters, click the More icon (...) and choose 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 for OBProxy clusters, click the More icon ( ... ) and choose Download All Logs .
In the OBProxies list of the Overview page for OBProxy clusters, find the target OBProxy cluster and click Download Logs in the Actions column.
On the Log Search page, set query conditions in the table below.

Condition Description Time Range The default time range is last 1 hour. You can select the time range of last 5, 10, 15, or 30 minutes or last 24 hours on the left. You can also customize a time range in the time filter on the right. Object Scope The scope for log query. This parameter is required. * Select OceanBase Cluster, OBProxy Cluster, or Host from the first drop-down list to specify the log query object. * Select one or more servers of this object from the second drop-down list. Log Type The log type and files. This parameter is required. For more information, see Log types. * Select OBServer Logs, OBProxy Log, Host Logs, or OCP Agent Logs from the first drop-down list to specify the log type. * Select one or more log files of this type from the second 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 Search .
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.
Click Download Logs .
All logs that meet the query conditions are downloaded.
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 specify for the ocp.agent.ob-cleaner.config parameter: * The logs are not cleared when the log disk usage is less than the threshold. The default threshold is 80%. * If the log disk usage exceeds the threshold, the system first clears logs that are generated before the specified time. * The clearing action stops if the log disk usage is less than the threshold after clearing. * Otherwise, the logs are deleted based on the retention percentage. |
| OBProxy Log | 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. |