This topic describes how to download logs.
Prerequisites
Ensure the current OCP user has the following permissions:
- Any of the following resource permissions: Cluster Read-Only, Tenant Read-Only, OBProxy Read-Only, Arbitration Service Read-Only, Binlog Service Read-Only, or Host Read-Only.
- The All menu permission for log search.
Download scope
You can access the Log Search page from the download log entries on multiple pages and select specific logs within a range to download based on the filter conditions. The download log entries are as follows:
On the cluster Overview page, hover the cursor over the more icon in the upper-right corner and click Download Logs in the drop-down list.
On the OBProxy cluster Overview page, hover the cursor over the more icon in the upper-right corner and click Download All Logs in the drop-down list.
On the Basic Information tab of a host, click Download Logs.
On the Log Services page, under Log Search, click Download Logs in the upper-right corner of the log query results.
Select a time period
You can choose a time range of the last 5 minutes, 10 minutes, 15 minutes, 30 minutes, 1 hour, 3 hours, 6 hours, 12 hours, 24 hours, or 7 days. You can also customize the start and end times for the data contained in the logs.
Object scope
You can choose to view logs for a specific host. The scope includes OceanBase Cluster, Arbitration Service, OBProxy Cluster, Binlog Server, Binlog Instance, and Host.
Log type
The log type information is as follows:
Log Type |
Description |
|---|---|
| OB Log | All logs in the log/ directory of the OceanBase cluster are categorized into four types: observer, rootservice, election, and alert. |
| Arbitration Service Logs | All logs in the log/ directory of the arbitration service installation path are categorized into three types: arbitration_observer, arbitration_rootservice, and arbitration_election. |
| OBProxy Logs | /home/admin/logs/obproxy/log/All logs in the directory are subdivided intoobproxy、obproxy_digest、obproxy_stat、obproxy_slow、obproxy_limit、obproxy_diagnosis、obproxy_xflush、obproxy_error8 classes. |
| Binlog Server Logs | All logs in the Binlog cluster installation path/log/ directory are categorized into three types: binlog_server_deploy, binlog_server_logproxy, and binlog_server_out. |
| Binlog Instance Logs | All logs in the Binlog cluster installation path/run/Instance name/log directory are categorized into four types: binlog_service_instance, binlog_service_init, binlog_service_libobcdc, and binlog_service_libobcdc_stderr. |
| Host Logs | /var/logThe message-Date file in the path. |
| OCP Agent Logs | /home/admin/ocp_agent/log/All logs in the directory are subdivided intomgragent、monagent、agentctl、agentd4 categories. |
Keywords
You can filter logs by including or excluding keywords. The system performs an exact match for the corresponding keywords. This operation is case-insensitive and optional.
- Include keywords: Logs containing these keywords will be filtered out during the query. Supports regular expression and exact match for multiple keywords.
- Exclude keywords: Logs containing these keywords will be filtered out during the query. Supports exclusion for multiple keywords.
Supports regular expression and exact match for multiple keywords. Logs containing these keywords will be filtered out during the query. When you choose to exclude keywords, logs containing these keywords will be filtered out during the query. Supports exclusion for multiple keywords. This operation is optional.
Log level
You can select the log alert level from the log level drop-down list. The seven levels are ERROR, WARN, INFO, WDIAG, EDIAG, TRACE, and DEBUG. This operation is optional.
