Meet OceanBase AI Database, the unified database for operational data, real-time analytics, and AI. Explore ->

Meet OceanBase AI Database, the unified database for operational data, real-time analytics, and AI. Explore ->

OceanBase logo

OceanBase

A unified distributed database ready for your transactional, analytical, and AI workloads.

Product Overview
DEPLOY YOUR WAY

OceanBase Cloud

The best way to deploy and scale OceanBase

OceanBase Enterprise

Run and manage OceanBase on your infra

TRY OPEN SOURCE

OceanBase Community Edition

The free, open-source distributed database

OceanBase seekdb

Open source AI native search database

Customer Stories

Real-world success stories from enterprises across diverse industries.

View All
BY USE CASES

Mission-Critical Transactions

Global & Multicloud Application

Elastic Scaling for Peak Traffic

Real-time Analytics

Active Geo-redundancy

Database Consolidation

Resources

Comprehensive knowledge hub for OceanBase.

Blog

Live Demos

Training & Certification

Documentation

Official technical guides, tutorials, API references, and manuals for all OceanBase products.

View All
PRODUCTS

OceanBase Cloud

OceanBase Database

Tools

Connectors and Middleware

QUICK START

OceanBase Cloud

OceanBase Database

BEST PRACTICES

Practical guides for utilizing OceanBase more effectively and conveniently

Company

Learn more about OceanBase – our company, partnerships, and trust and security initiatives.

About OceanBase

Partner

Trust Center

Contact Us

International - English
中国站 - 简体中文
日本 - 日本語
Sign In
Start on Cloud

OceanBase

A unified distributed database ready for your transactional, analytical, and AI workloads.

Product Overview
DEPLOY YOUR WAY

OceanBase Cloud

The best way to deploy and scale OceanBase

OceanBase Enterprise

Run and manage OceanBase on your infra

TRY OPEN SOURCE

OceanBase Community Edition

The free, open-source distributed database

OceanBase seekdb

Open source AI native search database

Customer Stories

Real-world success stories from enterprises across diverse industries.

View All
BY USE CASES

Mission-Critical Transactions

Global & Multicloud Application

Elastic Scaling for Peak Traffic

Real-time Analytics

Active Geo-redundancy

Database Consolidation

Comprehensive knowledge hub for OceanBase.

Blog

Live Demos

Training & Certification

Documentation

Official technical guides, tutorials, API references, and manuals for all OceanBase products.

View All
PRODUCTS
OceanBase CloudOceanBase Database
ToolsConnectors and Middleware
QUICK START
OceanBase CloudOceanBase Database
BEST PRACTICES

Practical guides for utilizing OceanBase more effectively and conveniently

Learn more about OceanBase – our company, partnerships, and trust and security initiatives.

About OceanBase

Partner

Trust Center

Contact Us

Start on Cloud
编组
All Products
    • Databases
    • iconOceanBase Database
    • iconOceanBase Cloud
    • iconOceanBase Tugraph
    • iconInteractive Tutorials
    • iconOceanBase Best Practices
    • Tools
    • iconOceanBase Cloud Platform
    • iconOceanBase Migration Service
    • iconOceanBase Developer Center
    • iconOceanBase Migration Assessment
    • iconOceanBase Admin Tool
    • iconOceanBase Loader and Dumper
    • iconOceanBase Deployer
    • iconKubernetes operator for OceanBase
    • iconOceanBase Diagnostic Tool
    • iconOceanBase Binlog Service
    • Connectors and Middleware
    • iconOceanBase Database Proxy
    • iconEmbedded SQL in C for OceanBase
    • iconOceanBase Call Interface
    • iconOceanBase Connector/C
    • iconOceanBase Connector/J
    • iconOceanBase Connector/ODBC
    • iconOceanBase Connector/NET
icon

OceanBase Diagnostic Tool

V4.3.0

  • obdiag Overview
  • obdiag installation
  • obdiag configuration
  • One-click Cluster Inspection
    • One-click cluster inspection
    • Detailed explanation of cluster inspection indicators
  • One-click Information Gathering
    • One-click routine information collection
      • OceanBase cluster log collection
      • Host information collection
      • SQL details collection
      • Stack information collection
      • Flame Picture/Bian Que Picture Collection
      • ASH report collection
      • Collect table-related information
      • Cluster parameter collection
      • Variable collection
      • clog/slog collection
      • DBMS_XPLAN information collection
      • Core file collection
      • AWR report collection
      • obproxy log collection
      • OMS log collection
      • Collect all information
    • One-click scenario-based information collection
      • Overview
      • Collect basic cluster information
      • Collect backup problem information
      • Collect backup cleanup problem information
      • Collect clog disk full problem information
      • Collect cluster downtime problem information
      • Collect merge problem information
      • Collect CPU high problem information
      • Collect information on delay issues in primary and standby databases
      • Collect I/O problem information
      • Collect log archiving problem information
      • Collect long transaction problem information
      • Collect memory problem information
      • Collect SQL performance problem information
      • Collect PX error reporting information
      • Collect recovery problem information
      • Collect observer restart information without reason
      • Collect owner-cutting problem information
      • Collect information about hanging transaction issues
      • Collect copy imbalance problem information
      • Collect SQL error reporting information
      • Collect cluster TopSQL information
      • Collect application error information
      • Collect obproxy restart problem information for no reason
      • Collect ODP parameter information
      • Collect unspecified scenario problem information
  • One-click Diagnostic Analysis
    • One-click diagnostic analysis log
    • One-click full-link diagnostic log analysis
    • Parameter analysis (compared with default values)
    • Parameter analysis (parameter differences on different observers)
    • Analyze variables
    • Instructions for using index space analysis
    • One-click diagnostic analysis of memory
    • One-click diagnosis and analysis of queue backlog
  • One-click Root Cause Analysis
    • One-click root cause analysis
    • Root cause analysis scenario: disconnection
    • Root cause analysis scenario: card merging major_hold
    • Root cause analysis scenario: lock conflict lock_conflict
    • Root cause analysis scenario: executing DDL and reporting disk full error ddl_disk_full
    • Root cause analysis scenario: clog disk is full clog_disk_full
    • Root cause analysis scenario: log error log_error
    • Root cause analysis scenario: DDL failure ddl_failure
    • Root cause analysis scenario: Troubleshooting index build execution error index_ddl_error
    • Root cause analysis scenario: transaction disconnection scenario transaction_disconnection
    • Root cause analysis scenario: transaction execution times out and error transaction_execute_timeout
    • Root cause analysis scenario: transaction does not end and error transaction_not_ending is reported
    • Root cause analysis scenario: transaction other errors transaction_other_error
    • Root cause analysis scenario: transaction rollback error transaction_rollback
    • Root cause analysis scenario: transaction wait timeout error transaction_wait_timeout
    • Root cause analysis scenario: OMS full migration exception oms_full_trans
    • Root cause analysis scenario: OMS obcdc component analysis oms_obcdc
    • Root cause analysis scenario: suspended transaction suspend_transaction
    • Root cause analysis scenario: Unit GC exception unit_gc
    • Root cause analysis scenario: OceanBase cluster playback card
    • Root cause analysis scenario: OceanBase cluster memory explosion
    • Root cause analysis scenario: Abnormal deletion of OBServer node
    • Root cause analysis scenario: GC troubleshooting gc_troubleshooting
    • Root cause analysis scenario: Schema leak schema_leak
    • Root cause analysis scenario: partition split scheduling error split_schedule_error
    • Root cause analysis scenario: weak read problem troubleshooting weak_read_troubleshooting
    • Root cause analysis scenario: SQL execution memory is too high execute_memory_high
  • One-click Cluster Insights
    • Overview
    • Cluster overview information insights
    • Cluster node information insight
    • Cluster unit information insight
    • Cluster Zone Information Insights
    • Cluster RS Information Insights
    • Cluster tenant information insight
    • Cluster event information insight
    • Cluster lock information insight
    • Cluster topsql information insight
    • Cluster slowsql information insight
    • Cluster table information insight
    • Cluster processlist information insight
    • SQL execution plan information insights
    • Insights into database disk usage information
    • Insight on the disk usage of the specified table in the database
    • Insights into the full tenant information of the cluster
    • Cluster node CPU usage information insights
    • Internal table name fuzzy matching information insight
    • Cluster leader information insight
    • Information insights into locks held on a certain table
    • Cluster long transaction information information insight
    • Actual execution plan operator information insight
    • Memory information insights for all tenants
    • processlist Real-time session summary information insights
    • Table/index storage method information insight
    • Table NDV Information Insights
    • Table index information insight
    • Merge status display
    • clog log volume/capacity statistics
  • Plug-in file upgrade
  • Update and uninstall
  • Telemetry Mode
  • FAQ
  • Tools
    • Configuration file encryption
    • AI Intelligent Diagnosis Assistant
    • Disk IO performance detection
    • Configure verification tool
  • Release Notes
    • obdiag V4.2.0
    • obdiag V4.1.0
    • obdiag V4.0.0
    • obdiag V3.7.2
    • obdiag V3.7.1
    • obdiag V3.7.0
    • obdiag V3.6.0
    • obdiag V3.5.0
    • obdiag V3.4.0
    • obdiag V3.3.0
    • obdiag V3.2.0
    • obdiag V3.1.0
    • obdiag V3.0.0
    • obdiag V2.6.0
    • obdiag V2.5.0
    • obdiag V2.4.0
    • obdiag V2.3.0
    • obdiag V2.2.0
    • obdiag V2.1.0
    • obdiag V2.0.0
    • obdiag V1.6.2
    • obdiag V1.6.1
    • obdiag V1.6.0
    • obdiag V1.5.2
    • obdiag V1.5.1
    • obdiag V1.5.0
    • obdiag V1.4.0
    • obdiag V1.3.0

Download PDF

obdiag Overviewobdiag installationobdiag configurationOne-click cluster inspectionDetailed explanation of cluster inspection indicatorsOceanBase cluster log collectionHost information collectionSQL details collectionStack information collectionFlame Picture/Bian Que Picture CollectionASH report collectionCollect table-related informationCluster parameter collectionVariable collectionclog/slog collectionDBMS_XPLAN information collectionCore file collectionAWR report collectionobproxy log collectionOMS log collectionCollect all informationOverviewCollect basic cluster informationCollect backup problem informationCollect backup cleanup problem informationCollect clog disk full problem informationCollect cluster downtime problem informationCollect merge problem informationCollect CPU high problem informationCollect information on delay issues in primary and standby databasesCollect I/O problem informationCollect log archiving problem informationCollect long transaction problem informationCollect memory problem informationCollect SQL performance problem informationCollect PX error reporting informationCollect recovery problem informationCollect observer restart information without reasonCollect owner-cutting problem informationCollect information about hanging transaction issuesCollect copy imbalance problem informationCollect SQL error reporting informationCollect cluster TopSQL informationCollect application error informationCollect obproxy restart problem information for no reasonCollect ODP parameter informationCollect unspecified scenario problem informationOne-click diagnostic analysis logOne-click full-link diagnostic log analysisParameter analysis (compared with default values)Parameter analysis (parameter differences on different observers)Analyze variablesInstructions for using index space analysisOne-click diagnostic analysis of memoryOne-click diagnosis and analysis of queue backlogOne-click root cause analysisRoot cause analysis scenario: disconnectionRoot cause analysis scenario: card merging major_holdRoot cause analysis scenario: lock conflict lock_conflictRoot cause analysis scenario: executing DDL and reporting disk full error ddl_disk_fullRoot cause analysis scenario: clog disk is full clog_disk_fullRoot cause analysis scenario: log error log_errorRoot cause analysis scenario: DDL failure ddl_failureRoot cause analysis scenario: Troubleshooting index build execution error index_ddl_errorRoot cause analysis scenario: transaction disconnection scenario transaction_disconnectionRoot cause analysis scenario: transaction execution times out and error transaction_execute_timeoutRoot cause analysis scenario: transaction does not end and error transaction_not_ending is reportedRoot cause analysis scenario: transaction other errors transaction_other_errorRoot cause analysis scenario: transaction rollback error transaction_rollbackRoot cause analysis scenario: transaction wait timeout error transaction_wait_timeoutRoot cause analysis scenario: OMS full migration exception oms_full_transRoot cause analysis scenario: OMS obcdc component analysis oms_obcdcRoot cause analysis scenario: suspended transaction suspend_transactionRoot cause analysis scenario: Unit GC exception unit_gcRoot cause analysis scenario: OceanBase cluster playback cardRoot cause analysis scenario: OceanBase cluster memory explosionRoot cause analysis scenario: Abnormal deletion of OBServer nodeRoot cause analysis scenario: GC troubleshooting gc_troubleshootingRoot cause analysis scenario: Schema leak schema_leakRoot cause analysis scenario: partition split scheduling error split_schedule_errorRoot cause analysis scenario: weak read problem troubleshooting weak_read_troubleshootingRoot cause analysis scenario: SQL execution memory is too high execute_memory_highOverviewCluster overview information insightsCluster node information insightCluster unit information insightCluster Zone Information InsightsCluster RS Information InsightsCluster tenant information insightCluster event information insightCluster lock information insightCluster topsql information insightCluster slowsql information insightCluster table information insightCluster processlist information insightSQL execution plan information insightsInsights into database disk usage informationInsight on the disk usage of the specified table in the databaseInsights into the full tenant information of the clusterCluster node CPU usage information insights
OceanBase logo

The Unified Distributed Database for the AI Era.

Follow Us
Products
OceanBase CloudOceanBase EnterpriseOceanBase Community EditionOceanBase seekdb
Resources
DocsBlogWhite PaperLive DemosTraining & CertificationTicket
Company
About OceanBaseTrust CenterLegalPartnerContact Us
Follow Us

© OceanBase 2026. All rights reserved

Cloud Service AgreementPrivacy PolicySecurity
Contact Us
Document Feedback
  1. Documentation Center
  2. OceanBase Diagnostic Tool
  3. V4.3.0
iconOceanBase Diagnostic Tool
V 4.3.0
Databases
  • OceanBase Database
  • OceanBase Cloud
  • OceanBase Tugraph
  • Interactive Tutorials
  • OceanBase Best Practices
Tools
  • OceanBase Cloud Platform
  • OceanBase Migration Service
  • OceanBase Developer Center
  • OceanBase Migration Assessment
  • OceanBase Admin Tool
  • OceanBase Loader and Dumper
  • OceanBase Deployer
  • Kubernetes operator for OceanBase
  • OceanBase Diagnostic Tool
  • OceanBase Binlog Service
Connectors and Middleware
  • OceanBase Database Proxy
  • Embedded SQL in C for OceanBase
  • OceanBase Call Interface
  • OceanBase Connector/C
  • OceanBase Connector/J
  • OceanBase Connector/ODBC
  • OceanBase Connector/NET
  • V 4.3.0
  • V 4.2.0
  • V 3.3.0
  • V 3.2.0
  • V 3.1.0
  • V 3.0.0
  • V 2.6.0
  • V 2.5.0
  • V 2.4.0
  • V 2.3.0
  • V 1.5.0
  • V 1.4.0

One-click diagnostic analysis log

Last Updated:2026-06-30 15:09:40  Updated
Share
What is on this page
Instructions for use
Usage example
Method 1: Use without configuration file (out of the box)
Method 2: Use with configuration file

folded

Share

This article applies to the scenario of independent deployment of obdiag. Use the obdiag analyze log command to analyze OceanBase logs and find out the error information that has occurred.

If it is a cluster deployed by obd, you can directly collect information on the selected cluster through the obd side diagnostic command group.

Instructions for use

obdiag analyze log [options]

Use this command to analyze OceanBase cluster logs online with one click, or enable offline analysis mode through --files.

The options are explained below:

Option name
Is it required
Data type
Default value
Description
--from No string Default is empty Starting point of analysis time range, format: yyyy-mm-dd hh:mm:ss.
--to No string Default is empty The end of the analysis time range, format: yyyy-mm-dd hh:mm:ss.
--since No string 30m The time range relative to the current time, format: <n><m|h|d>, where n represents the time number to be entered, m represents minutes, h represents hours, and d represents days, such as 1h represents the last hour.
--scope No string all The log type to be analyzed, optional values are observer, election, rootservice, all.
--grep No string Default is empty Keyword filtering, can be specified multiple times.
--log_level No string Default is empty Only logs with a level no lower than this level will be analyzed. Configurable values ​​are DEBUG, TRACE, INFO, WDIAG, WARN, EDIAG, ERROR.
--files No string Default is empty In offline analysis mode, specify a local log file or directory; after specifying, ignore --from, --to, --since and analyze from local files.
--store_dir No string Current directory Analysis result storage path.
--temp_dir No string /tmp The temporary file storage directory of the remote node during online analysis.
--tenant_id No string Default is empty Filter error statistics by tenant. You can fill in the tenant name or tenant_id:xxx (such as tenant_id:1001); if not filled in, all tenants will be counted.
-c No string ~/.obdiag/config.yml Configuration file path.
--inner_config No string Default is empty obdiag Self-configuration, format: --inner_config key=value.
--config No string Default is empty Cluster configuration, format: --config key1=value1 --config key2=value2. See obdiag configuration for details.
--config_password No string Default is empty obdiag When using an encrypted configuration file, you need to pass in the corresponding password through this option. For details, see Configuration File Encryption.

Description

  • The online analysis referred to in this article refers to the online running status of the OceanBase cluster, and the logs are distributed on each OBServer node.
  • The offline analysis mode referred to in this article is that when the --files parameter is passed, the OBServer logs that have been collected on the obdiag deployment machine can be analyzed.

Usage example

Method 1: Use without configuration file (out of the box)

  • Online analysis log example:
  obdiag analyze log --from "2023-10-08 10:25:00" --to "2023-10-08 11:30:00" \
    --config obcluster.servers.nodes[0].ip=xx.xx.xx.1 \
    --config obcluster.servers.nodes[1].ip=xx.xx.xx.2 \
    --config obcluster.servers.global.ssh_username=test \
    --config obcluster.servers.global.ssh_password=****** \
    --config obcluster.servers.global.home_path=/home/admin/oceanbase

The output is as follows:

  ...
  FileListInfo:
  +----------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  | Node           | LogList                                                                                                                                                                                                               |
  +================+=======================================================================================================================================================================================================================+
  | xx.xx.xx.xx   | ['observer.log.20231008104204260', 'observer.log.20231008111305072', 'observer.log.20231008114410668', 'observer.log.wf.20231008104204260', 'observer.log.wf.20231008111305072', 'observer.log.wf.20231008114410668'] |
  +----------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  ...


  Analyze OceanBase Online Log Summary:
  +----------------+-----------+------------------------------------------------------------------------------+-------------+-------------------------------------------------------------------------------------------------------------------------------+---------+
  | Node           | Status    | FileName                                                                     |   ErrorCode | Message                                                                                                                       |   Count |
  +================+===========+==============================================================================+=============+===============================================================================================================================+=========+
  | xx.xx.xx.xx    | Completed | analyze_pack_20231008171201/xx_xx_xx_xx/observer.log.20231008104204260       |       -5006 | You have an error in your SQL syntax; check the manual that corresponds to your OceanBase version for the right syntax to use |       2 |
  +----------------+-----------+------------------------------------------------------------------------------+-------------+-------------------------------------------------------------------------------------------------------------------------------+---------+
  | xx.xx.xx.xx    | Completed | analyze_pack_20231008171201/xx_xx_xx_xx/observer.log.20231008111305072       |       -5006 | You have an error in your SQL syntax; check the manual that corresponds to your OceanBase version for the right syntax to use |       8 |
  +----------------+-----------+------------------------------------------------------------------------------+-------------+-------------------------------------------------------------------------------------------------------------------------------+---------+
  | xx.xx.xx.xx    | Completed | analyze_pack_20231008171201/xx_xx_xx_xx/observer.log.20231008114410668       |       -5006 | You have an error in your SQL syntax; check the manual that corresponds to your OceanBase version for the right syntax to use |      10 |
  +----------------+-----------+------------------------------------------------------------------------------+-------------+-------------------------------------------------------------------------------------------------------------------------------+---------+
  | xx.xx.xx.xx    | Completed | analyze_pack_20231008171201/xx_xx_xx_xx/observer.log.20231008114410668       |       -4009 | IO error                                                                                                                      |      20 |
  +----------------+-----------+------------------------------------------------------------------------------+-------------+-------------------------------------------------------------------------------------------------------------------------------+---------+
  For more details, please run cmd 'cat analyze_pack_20231008171201/result_details.txt'
  ```* Quickly analyze the logs of the recent period:

```shell
  # Online: analyze the last hour of logs pulled from remote hosts for errors
  obdiag analyze log --since 1h \
    --config obcluster.servers.nodes[0].ip=xx.xx.xx.1 \
    --config obcluster.servers.nodes[1].ip=xx.xx.xx.2 \
    --config obcluster.servers.nodes[2].ip=xx.xx.xx.3 \
    --config obcluster.servers.global.home_path=/home/admin/oceanbase

  # Online: analyze the last hour of logs pulled from remote hosts for errors
  # Provide sys tenant connection; obdiag resolves cluster node IP addresses
  obdiag analyze log --since 1h \
    --config db_host=xx.xx.xx.xx \
    --config db_port=xxxx \
    --config tenant_sys.user=root@sys \
    --config tenant_sys.password=*** \
    --config obcluster.servers.global.ssh_username=test \
    --config obcluster.servers.global.ssh_password=****** \
    --config obcluster.servers.global.home_path=/home/admin/oceanbase


  # Online: analyze last 30 minutes of logs from remotes for errors
  # Provide sys tenant connection; obdiag resolves cluster node IP addresses
  obdiag analyze log --since 30m \
    --config db_host=xx.xx.xx.xx \
    --config db_port=xxxx \
    --config tenant_sys.user=root@sys \
    --config tenant_sys.password=*** \
    --config obcluster.servers.global.ssh_username=test \
    --config obcluster.servers.global.ssh_password=****** \
    --config obcluster.servers.global.home_path=/home/admin/oceanbase
  ```* Offline analysis log example

```shell
  $ ls -lh test/
  -rw-r--r--  1 admin  staff   256M Oct  8 17:24 observer.log.20231008104204260
  -rw-r--r--  1 admin  staff   256M Oct  8 17:24 observer.log.20231008111305072
  -rw-r--r--  1 admin  staff   256M Oct  8 17:24 observer.log.20231008114410668
  -rw-r--r--  1 admin  staff    18K Oct  8 17:24 observer.log.wf.20231008104204260
  -rw-r--r--  1 admin  staff    19K Oct  8 17:24 observer.log.wf.20231008111305072
  -rw-r--r--  1 admin  staff    18K Oct  8 17:24 observer.log.wf.20231008114410668

  $ obdiag analyze log --files test/

  Analyze OceanBase Offline Log Summary:
  +-----------+-----------+-----------------------------------------------------------------------+-------------+-------------------------------------------------------------------------------------------------------------------------------+---------+
  | Node      | Status    | FileName                                                              |   ErrorCode | Message                                                                                                                       |   Count |
  +===========+===========+=======================================================================+=============+===============================================================================================================================+=========+
  | 127.0.0.1 | Completed | analyze_pack_20231008172144/127_0_0_1_/observer.log.20231008104204260 |       -5006 | You have an error in your SQL syntax; check the manual that corresponds to your OceanBase version for the right syntax to use |       2 |
  +-----------+-----------+-----------------------------------------------------------------------+-------------+-------------------------------------------------------------------------------------------------------------------------------+---------+
  | 127.0.0.1 | Completed | analyze_pack_20231008172144/127_0_0_1_/observer.log.20231008111305072 |       -5006 | You have an error in your SQL syntax; check the manual that corresponds to your OceanBase version for the right syntax to use |       8 |
  +-----------+-----------+-----------------------------------------------------------------------+-------------+-------------------------------------------------------------------------------------------------------------------------------+---------+
  | 127.0.0.1 | Completed | analyze_pack_20231008172144/127_0_0_1_/observer.log.20231008114410668 |       -5006 | You have an error in your SQL syntax; check the manual that corresponds to your OceanBase version for the right syntax to use |      10 |
  +-----------+-----------+-----------------------------------------------------------------------+-------------+-------------------------------------------------------------------------------------------------------------------------------+---------+
  | 127.0.0.1 | Completed | analyze_pack_20231008172144/127_0_0_1_/observer.log.20231008114410668 |       -4009 | IO error                                                                                                                      |      20 |
  +-----------+-----------+-----------------------------------------------------------------------+-------------+-------------------------------------------------------------------------------------------------------------------------------+---------+
  For more details, please run cmd 'cat analyze_pack_20231008172144/result_details.txt'
  ```* Offline analysis of specified observer logs:

```shell
  # Offline: analyze the given log file(s)
  obdiag analyze log --files observer.log.20230831142211247 
  ```* Filter error statistics by tenant (only errors for the specified tenant are displayed):

```shell
  # Filter by tenant name (online)
  obdiag analyze log --since 1h --tenant_id my_tenant

  # Filter by tenant ID (format tenant_id:xxx)
  obdiag analyze log --since 1h --tenant_id tenant_id:1001

  # Offline analysis can filter by tenant too
  obdiag analyze log --files test/ --tenant_id tenant_id:1001

Method 2: Use with configuration file

You need to ensure that the login information of the node to be collected has been configured in the obdiag configuration file ~/.obdiag/config.yml. For related detailed configuration introduction, see obdiag configuration. .

  • Online analysis log example:
  obdiag analyze log --from "2023-10-08 10:25:00" --to "2023-10-08 11:30:00"
  ```* Quickly analyze the logs of the recent period:

```shell
  # Online: analyze the last hour of logs pulled from remote hosts for errors
  obdiag analyze log --since 1h


  # Online: analyze last 30 minutes of logs from remotes for errors
  obdiag analyze log --since 30m
  ```* Offline analysis of specified observer logs:

```shell
  # Offline: analyze the given log file(s)
  obdiag analyze log --files observer.log.20230831142211247 

Previous topic

Collect unspecified scenario problem information
Last

Next topic

One-click full-link diagnostic log analysis
Next
What is on this page
Instructions for use
Usage example
Method 1: Use without configuration file (out of the box)
Method 2: Use with configuration file