diff --git a/README-CN.md b/README-CN.md index d14ecbcc..c1df09de 100644 --- a/README-CN.md +++ b/README-CN.md @@ -62,49 +62,45 @@ obdiag config -h -u [-p password] [-P port] ``` # obdiag 功能 +- 一键集群巡检 +- 一键诊断分析 +- 一键根因分析 +- 一键信息采集 -## obdiag 巡检功能 -- [一键巡检](./docs/check.md) -## obdiag 一键场景化信息采集功能 -- [一键场景化信息采集](./docs/gather_scene.md) +# 参与贡献 -## obdiag 一键信息采集功能 +obdiag 期望构建一个开放的社区,我们欢迎任何形式的贡献,您可以: +- 通过 [Issues](https://github.com/oceanbase/oceanbase-diagnostic-tool/issues) 提交 bug。 +- 通过 [Discussion](https://github.com/oceanbase/oceanbase-diagnostic-tool/discussions) 参与或发起讨论。 +- 通过 [Pull requests](https://github.com/oceanbase/oceanbase-diagnostic-tool/pulls) 提交问题修复或者功能特性。 -- [一键收集OB日志](./docs/gather_ob_log.md) -- [一键收集AWR报告](./docs/gather_awr.md) -- [一键收集主机信息](./docs/gather_sysstat.md) -- [一键收集slog/clog日志](./docs/gather_admin.md) -- [一键收集火焰图信息](./docs/gather_perf.md) -- [一键收集OB堆栈信息](./docs/gather_ob_stack.md) -- [一键收集并行SQL的执行详情信息](./docs/gather_sql_plan_monitor.md) -- [一键收集OBPROXY日志](./docs/gather_obproxy_log.md) -- [一键收集AWR报告](./docs/gather_awr.md) -- [一键收集全部诊断信息](./docs/gather_all.md) +# Roadmap Ahead -## obdiag 一键分析功能说明 -- [一键分析OB日志](./docs/analyze_ob_log.md) -- [一键全链路诊断](./docs/analyze_flt_trace.md) +| 版本 | 迭代周期 | 功能点 | +|---------|---------------|---------| +|1.6.0| 2024.01| | +|2.0.0|2024.03| | +|2.1.0|2024.04| | +|2.2.0|2024.05| | +|2.3.0|2024.06| | +|2.4.0|2024.07| | +|2.5.0|2024.08| | +|3.0.0|2024.09| | +|3.1.0|2024.10| | +|3.2.0|2024.11| | +|3.3.0|2024.12| | -## obdiag 一键场景化根因分析功能 -- [一键场景化根因分析](./docs/rca.md) # 许可证 OceanBase Diagnostic Tool 使用 [MulanPSL - 2.0](http://license.coscl.org.cn/MulanPSL2) 许可证。 您可以免费复制及使用源代码。当您修改或分发源代码时,请遵守木兰协议。 - -## 贡献 - -我们热烈欢迎并高度赞赏您的贡献。您可以通过以下几种方式做出贡献: - -- 向我们提出一个[issue](https://github.com/oceanbase/oceanbase-diagnostic-tool/issues)。 -- 提交请求。 - ## 支持 如果您在使用 OceanBase LogProxy 时遇到任何问题,欢迎联系我们寻求帮助: - [GitHub Issue](https://github.com/oceanbase/oceanbase-diagnostic-tool/issues) - [官方网站](https://www.oceanbase.com/docs/obdiag-cn) +- obdiag SIG 微信号: obdiagsig \ No newline at end of file diff --git a/README.md b/README.md index f5164359..c2b372ba 100644 --- a/README.md +++ b/README.md @@ -64,48 +64,48 @@ obdiag config -h -u [-p password] [-P port] ``` # obdiag Fuctions +- One-click cluster inspection +- One-click diagnostic analyze +- One-click root cause analysis +- One-click information collection -## obdiag check Fuctions -- [check](./docs/check.md) +For more details, please refer to [Official docs](https://www.oceanbase.com/docs/obdiag-cn) -## obdiag gather scene Fuctions -- [gather scene](./docs/gather_scene.md) +# Join the Contributing Community -## obdiag gather Fuctions +obdiag envisions an open community. We welcome your contributions in any form: -- [gather log](./docs/gather_ob_log.md) -- [gather sysstat](./docs/gather_sysstat.md) -- [gather slog/clog](./docs/gather_admin.md) -- [gather perf](./docs/gather_perf.md) -- [gather obstack](./docs/gather_ob_stack.md) -- [gather sql plan monitor](./docs/gather_sql_plan_monitor.md) -- [gather obproxy_log](./docs/gather_obproxy_log.md) -- [gather awr](./docs/gather_awr.md) -- [gather all](./docs/gather_all.md) +- Report bugs through [Issues](https://github.com/oceanbase/oceanbase-diagnostic-tool/issues). +- Participate in or initiate discussions via [Discussion](https://github.com/oceanbase/oceanbase-diagnostic-tool/discussions). +- Contribute bug fixes or new features through [Pull requests](https://github.com/oceanbase/oceanbase-diagnostic-tool/pulls). -## obdiag analyze Fuctions -- [analyze log](./docs/analyze_ob_log.md) -- [analyze flt trace log](./docs/analyze_flt_trace.md) -## obdiag rca Fuctions -- [rca](./docs/rca.md) + +# Roadmap Ahead + +| Version | Iteration Period | Function | +|---------|---------------|---------| +|1.6.0| 2024.01|
  • Scenario based fault information collection
  • Scenario based root cause analysis
| +|2.0.0|2024.03|
  • Context Transformation, Enhanced Scene Expansion Capabilities
  • Support online updating of inspection and gather tasks
  • Root Cause Analysis Phase II Transformation
| +|2.1.0|2024.04|
  • Root Cause Analysis Scenario Expansion
  • Gather tabledump
| +|2.2.0|2024.05|
  • Root Cause Analysis Scenario Expansion
| +|2.3.0|2024.06|
  • Root Cause Analysis Scenario Expansion
  • Support SQL Diagnosis
| +|2.4.0|2024.07|
  • Root Cause Analysis Scenario Expansion
  • Adapting Two Additional Kernel Diagnostic Tools
| +|2.5.0|2024.08|
  • Root Cause Analysis Scenario Expansion
  • Support OMS Diagnosis
| +|3.0.0|2024.09|
  • Root Cause Analysis Scenario Expansion
  • Service-ification Transformation
| +|3.1.0|2024.10|
  • Root Cause Analysis Scenario Expansion
  • Supporting Comparative Functionality for Patrol Inspection Reports
| +|3.2.0|2024.11|
  • Root Cause Analysis Scenario Expansion
  • SQL Diagnosis Phase II, Supporting Root Cause Analysis for SQL problems
| +|3.3.0|2024.12|
  • AI for obdiag
| # Licencing OceanBase Database is under MulanPubL - 2.0 license. You can freely copy and use the source code. When you modify or distribute the source code, please obey the MulanPubL - 2.0 license. - -# Contributing - -Contributions are warmly welcomed and greatly appreciated. Here are a few ways you can contribute: - -- Raise us an [issue](https://github.com/oceanbase/oceanbase-diagnostic-tool/issues). -- Submit Pull Requests. - # Support In case you have any problems when using obdiag, welcome reach out for help: - [GitHub Issue](https://github.com/oceanbase/oceanbase-diagnostic-tool/issues) - [Official Website](https://www.oceanbase.com/docs/obdiag-cn) +- obdiag SIG WeChat: obdiagsig diff --git a/handler/gather/gather_scenes.py b/handler/gather/gather_scenes.py index ffb7553b..6fdc9f01 100644 --- a/handler/gather/gather_scenes.py +++ b/handler/gather/gather_scenes.py @@ -133,6 +133,10 @@ def __init_task_names(self): self.yaml_tasks[item] = yaml_task_data else: self.stdio.error("Invalid Task :{0}".format(item)) + # hard code add gather observer.base + if len(self.code_tasks) > 0: + yaml_task_base = scene.get_one_yaml_task("observer.base") + self.yaml_tasks["observer.base"] = yaml_task_base else: self.stdio.error("get task name failed") diff --git a/handler/gather/tasks/observer/base.yaml b/handler/gather/tasks/observer/base.yaml new file mode 100644 index 00000000..e75c9c7a --- /dev/null +++ b/handler/gather/tasks/observer/base.yaml @@ -0,0 +1,68 @@ +info_en: "[cluster base info]" +info_cn: "[集群基础信息]" +command: obdiag gather scene run --scene=observer.base +task: + - version: "[2.0.0.0, 4.0.0.0]" + steps: + - type: sql + sql: "show variables like 'version_comment';" + global: true + - type: sql + sql: "SELECT * FROM oceanbase.v$ob_cluster" + global: true + - type: sql + sql: "SELECT * FROM oceanbase.__all_zone WHERE name='idc';" + global: true + - type: sql + sql: "select svr_ip,zone,with_rootserver,status,block_migrate_in_time,start_service_time,stop_time,build_version from oceanbase.__all_server order by zone;" + global: true + - type: sql + sql: "SELECT zone, concat(svr_ip, ':', svr_port) observer, cpu_capacity, cpu_total, cpu_assigned, cpu_assigned_percent, mem_capacity, mem_total, mem_assigned, mem_assigned_percent, unit_Num, round(`load`, 2) `load`, round(cpu_weight, 2) cpu_weight, round(memory_weight, 2) mem_weight, leader_count FROM oceanbase.__all_virtual_server_stat ORDER BY zone,svr_ip;" + global: true + - type: sql + sql: "select tenant_id,tenant_name,primary_zone,compatibility_mode from oceanbase.__all_tenant;" + global: true + - type: sql + sql: "show parameters like '%syslog_level%';" + global: true + - type: sql + sql: "show parameters like '%syslog_io_bandwidth_limit%';" + global: true + - type: sql + sql: "select count(*),tenant_id,zone_list,unit_count from oceanbase.__all_resource_pool group by tenant_id,zone_list,unit_count;" + global: true + - type: sql + sql: "show parameters" + global: true + - version: "[4.0.0.0, *]" + steps: + - type: sql + sql: "show variables like 'version_comment';" + global: true + - type: sql + sql: "SELECT * FROM oceanbase.DBA_OB_ZONES;" + global: true + - type: sql + sql: "SELECT * FROM oceanbase.DBA_OB_SERVERS;" + global: true + - type: sql + sql: "SELECT * FROM oceanbase.GV$OB_SERVERS;" + global: true + - type: sql + sql: "SELECT * FROM oceanbase.DBA_OB_UNIT_CONFIGS;" + global: true + - type: sql + sql: "SELECT * FROM oceanbase.DBA_OB_RESOURCE_POOLS;" + global: true + - type: sql + sql: "SELECT * FROM oceanbase.DBA_OB_TENANTS;" + global: true + - type: sql + sql: "SELECT c.TENANT_ID, e.TENANT_NAME, concat(c.NAME, ': ', d.NAME) `pool:conf`,concat(c.UNIT_COUNT, ' unit: ', d.min_cpu, 'C/', ROUND(d.MEMORY_SIZE/1024/1024/1024,0), 'G') unit_info FROM oceanbase.DBA_OB_RESOURCE_POOLS c, oceanbase.DBA_OB_UNIT_CONFIGS d, oceanbase.DBA_OB_TENANTS e WHERE c.UNIT_CONFIG_ID=d.UNIT_CONFIG_ID AND c.TENANT_ID=e.TENANT_ID AND c.TENANT_ID>1000 ORDER BY c.TENANT_ID;" + global: true + - type: sql + sql: "SELECT a.TENANT_NAME,a.TENANT_ID,b.SVR_IP FROM oceanbase.DBA_OB_TENANTS a, oceanbase.GV$OB_UNITS b WHERE a.TENANT_ID=b.TENANT_ID;" + global: true + - type: sql + sql: "show parameters" + global: true