From 097bc85e6701fff5f23e9be3d045e4b85c25ec32 Mon Sep 17 00:00:00 2001 From: Teingi Date: Tue, 9 Jul 2024 15:11:11 +0800 Subject: [PATCH] Optimize gather tasks file --- handler/gather/tasks/observer/backup.yaml | 6 +++--- .../gather/tasks/observer/backup_clean.yaml | 6 +++--- handler/gather/tasks/observer/base.yaml | 18 +++++++++--------- .../gather/tasks/observer/clog_disk_full.yaml | 6 +++--- handler/gather/tasks/observer/compaction.yaml | 6 +++--- .../observer/delay_of_primary_and_backup.yaml | 6 +++--- handler/gather/tasks/observer/io.yaml | 6 +++--- handler/gather/tasks/observer/log_archive.yaml | 6 +++--- .../tasks/observer/long_transaction.yaml | 6 +++--- handler/gather/tasks/observer/memory.yaml | 6 +++--- handler/gather/tasks/observer/recovery.yaml | 6 +++--- handler/gather/tasks/observer/restart.yaml | 6 +++--- .../tasks/observer/rootservice_switch.yaml | 6 +++--- .../tasks/observer/suspend_transaction.yaml | 6 +++--- .../tasks/observer/unit_data_imbalance.yaml | 6 +++--- handler/gather/tasks/observer/unknown.yaml | 6 +++--- .../gather/tasks/other/application_error.yaml | 6 +++--- 17 files changed, 57 insertions(+), 57 deletions(-) diff --git a/handler/gather/tasks/observer/backup.yaml b/handler/gather/tasks/observer/backup.yaml index 5fabd6d7..6e7cc91f 100644 --- a/handler/gather/tasks/observer/backup.yaml +++ b/handler/gather/tasks/observer/backup.yaml @@ -67,13 +67,13 @@ task: sql: "show variables like 'version_comment';" global: true - type: sql - sql: "SELECT * FROM oceanbase.DBA_OB_ZONES;" + sql: "SELECT * FROM oceanbase.DBA_OB_ZONES ORDER BY ZONE;" global: true - type: sql - sql: "SELECT * FROM oceanbase.DBA_OB_SERVERS;" + sql: "SELECT * FROM oceanbase.DBA_OB_SERVERS ORDER BY ZONE;" global: true - type: sql - sql: "SELECT * FROM oceanbase.GV$OB_SERVERS;" + sql: "SELECT SVR_IP,SVR_PORT,ZONE,SQL_PORT,CPU_CAPACITY,CPU_CAPACITY_MAX,CPU_ASSIGNED,CPU_ASSIGNED_MAX, concat(ROUND(MEM_CAPACITY/1024/1024/1024,0), 'G') as MEM_CAPACITY, concat(ROUND(MEM_ASSIGNED/1024/1024/1024,0), 'G') as MEM_ASSIGNED, concat(ROUND(LOG_DISK_CAPACITY/1024/1024/1024,0), 'G') as LOG_DISK_CAPACITY, concat(ROUND(LOG_DISK_ASSIGNED/1024/1024/1024,0), 'G') as LOG_DISK_ASSIGNED, concat(ROUND(LOG_DISK_IN_USE/1024/1024/1024,0), 'G') as LOG_DISK_IN_USE, concat(ROUND(DATA_DISK_CAPACITY/1024/1024/1024,0), 'G') as DATA_DISK_CAPACITY,concat(ROUND(DATA_DISK_IN_USE/1024/1024/1024,0), 'G') as DATA_DISK_IN_USE,concat(ROUND(MEMORY_LIMIT/1024/1024/1024,0), 'G') as MEMORY_LIMIT,concat(ROUND(DATA_DISK_ALLOCATED/1024/1024/1024,0), 'G') as DATA_DISK_ALLOCATED FROM oceanbase.GV$OB_SERVERS;" global: true - type: sql sql: "SELECT * FROM oceanbase.DBA_OB_UNIT_CONFIGS;" diff --git a/handler/gather/tasks/observer/backup_clean.yaml b/handler/gather/tasks/observer/backup_clean.yaml index 88fef329..699ced1d 100644 --- a/handler/gather/tasks/observer/backup_clean.yaml +++ b/handler/gather/tasks/observer/backup_clean.yaml @@ -73,13 +73,13 @@ task: sql: "show variables like 'version_comment';" global: true - type: sql - sql: "SELECT * FROM oceanbase.DBA_OB_ZONES;" + sql: "SELECT * FROM oceanbase.DBA_OB_ZONES ORDER BY ZONE;" global: true - type: sql - sql: "SELECT * FROM oceanbase.DBA_OB_SERVERS;" + sql: "SELECT * FROM oceanbase.DBA_OB_SERVERS ORDER BY ZONE;" global: true - type: sql - sql: "SELECT * FROM oceanbase.GV$OB_SERVERS;" + sql: "SELECT SVR_IP,SVR_PORT,ZONE,SQL_PORT,CPU_CAPACITY,CPU_CAPACITY_MAX,CPU_ASSIGNED,CPU_ASSIGNED_MAX, concat(ROUND(MEM_CAPACITY/1024/1024/1024,0), 'G') as MEM_CAPACITY, concat(ROUND(MEM_ASSIGNED/1024/1024/1024,0), 'G') as MEM_ASSIGNED, concat(ROUND(LOG_DISK_CAPACITY/1024/1024/1024,0), 'G') as LOG_DISK_CAPACITY, concat(ROUND(LOG_DISK_ASSIGNED/1024/1024/1024,0), 'G') as LOG_DISK_ASSIGNED, concat(ROUND(LOG_DISK_IN_USE/1024/1024/1024,0), 'G') as LOG_DISK_IN_USE, concat(ROUND(DATA_DISK_CAPACITY/1024/1024/1024,0), 'G') as DATA_DISK_CAPACITY,concat(ROUND(DATA_DISK_IN_USE/1024/1024/1024,0), 'G') as DATA_DISK_IN_USE,concat(ROUND(MEMORY_LIMIT/1024/1024/1024,0), 'G') as MEMORY_LIMIT,concat(ROUND(DATA_DISK_ALLOCATED/1024/1024/1024,0), 'G') as DATA_DISK_ALLOCATED FROM oceanbase.GV$OB_SERVERS;" global: true - type: sql sql: "SELECT * FROM oceanbase.DBA_OB_UNIT_CONFIGS;" diff --git a/handler/gather/tasks/observer/base.yaml b/handler/gather/tasks/observer/base.yaml index e75c9c7a..ef1fb488 100644 --- a/handler/gather/tasks/observer/base.yaml +++ b/handler/gather/tasks/observer/base.yaml @@ -40,29 +40,29 @@ task: sql: "show variables like 'version_comment';" global: true - type: sql - sql: "SELECT * FROM oceanbase.DBA_OB_ZONES;" + sql: "SELECT * FROM oceanbase.DBA_OB_ZONES ORDER BY ZONE;" global: true - type: sql - sql: "SELECT * FROM oceanbase.DBA_OB_SERVERS;" + sql: "SELECT * FROM oceanbase.DBA_OB_SERVERS ORDER BY ZONE;" global: true - type: sql - sql: "SELECT * FROM oceanbase.GV$OB_SERVERS;" + sql: "SELECT SVR_IP,SVR_PORT,ZONE,SQL_PORT,CPU_CAPACITY,CPU_CAPACITY_MAX,CPU_ASSIGNED,CPU_ASSIGNED_MAX, concat(ROUND(MEM_CAPACITY/1024/1024/1024,0), 'G') as MEM_CAPACITY, concat(ROUND(MEM_ASSIGNED/1024/1024/1024,0), 'G') as MEM_ASSIGNED, concat(ROUND(LOG_DISK_CAPACITY/1024/1024/1024,0), 'G') as LOG_DISK_CAPACITY, concat(ROUND(LOG_DISK_ASSIGNED/1024/1024/1024,0), 'G') as LOG_DISK_ASSIGNED, concat(ROUND(LOG_DISK_IN_USE/1024/1024/1024,0), 'G') as LOG_DISK_IN_USE, concat(ROUND(DATA_DISK_CAPACITY/1024/1024/1024,0), 'G') as DATA_DISK_CAPACITY,concat(ROUND(DATA_DISK_IN_USE/1024/1024/1024,0), 'G') as DATA_DISK_IN_USE,concat(ROUND(MEMORY_LIMIT/1024/1024/1024,0), 'G') as MEMORY_LIMIT,concat(ROUND(DATA_DISK_ALLOCATED/1024/1024/1024,0), 'G') as DATA_DISK_ALLOCATED FROM oceanbase.GV$OB_SERVERS;" global: true - type: sql - sql: "SELECT * FROM oceanbase.DBA_OB_UNIT_CONFIGS;" + sql: "SELECT * FROM oceanbase.DBA_OB_TENANTS;" global: true - type: sql - sql: "SELECT * FROM oceanbase.DBA_OB_RESOURCE_POOLS;" + 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 ORDER BY c.TENANT_ID;" global: true - type: sql - sql: "SELECT * FROM oceanbase.DBA_OB_TENANTS;" + 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: "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;" + sql: "select /*+read_consistency(weak) QUERY_TIMEOUT(60000000) */ t1.svr_ip, t1.role, t1.tenant_id,t1.database_name,t1.table_name, ifnull(t2.data_size,0) / 1073741824 as total_data_size_gb from (select tenant_id, database_name, table_name, role, svr_ip, table_id, tablet_id from oceanbase.cdb_ob_table_locations) t1 left join (select tenant_id, tablet_id, data_size from oceanbase.cdb_ob_tablet_replicas) t2 on t1.tenant_id = t2.tenant_id and t1.tablet_id = t2.tablet_id order by total_data_size_gb desc limit 50;" 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;" + sql: "show parameters" global: true - type: sql - sql: "show parameters" + sql: "show variables" global: true diff --git a/handler/gather/tasks/observer/clog_disk_full.yaml b/handler/gather/tasks/observer/clog_disk_full.yaml index ad246024..ecedeab0 100644 --- a/handler/gather/tasks/observer/clog_disk_full.yaml +++ b/handler/gather/tasks/observer/clog_disk_full.yaml @@ -58,13 +58,13 @@ task: sql: "show variables like 'version_comment';" global: true - type: sql - sql: "SELECT * FROM oceanbase.DBA_OB_ZONES;" + sql: "SELECT * FROM oceanbase.DBA_OB_ZONES ORDER BY ZONE;" global: true - type: sql - sql: "SELECT * FROM oceanbase.DBA_OB_SERVERS;" + sql: "SELECT * FROM oceanbase.DBA_OB_SERVERS ORDER BY ZONE;" global: true - type: sql - sql: "SELECT * FROM oceanbase.GV$OB_SERVERS;" + sql: "SELECT SVR_IP,SVR_PORT,ZONE,SQL_PORT,CPU_CAPACITY,CPU_CAPACITY_MAX,CPU_ASSIGNED,CPU_ASSIGNED_MAX, concat(ROUND(MEM_CAPACITY/1024/1024/1024,0), 'G') as MEM_CAPACITY, concat(ROUND(MEM_ASSIGNED/1024/1024/1024,0), 'G') as MEM_ASSIGNED, concat(ROUND(LOG_DISK_CAPACITY/1024/1024/1024,0), 'G') as LOG_DISK_CAPACITY, concat(ROUND(LOG_DISK_ASSIGNED/1024/1024/1024,0), 'G') as LOG_DISK_ASSIGNED, concat(ROUND(LOG_DISK_IN_USE/1024/1024/1024,0), 'G') as LOG_DISK_IN_USE, concat(ROUND(DATA_DISK_CAPACITY/1024/1024/1024,0), 'G') as DATA_DISK_CAPACITY,concat(ROUND(DATA_DISK_IN_USE/1024/1024/1024,0), 'G') as DATA_DISK_IN_USE,concat(ROUND(MEMORY_LIMIT/1024/1024/1024,0), 'G') as MEMORY_LIMIT,concat(ROUND(DATA_DISK_ALLOCATED/1024/1024/1024,0), 'G') as DATA_DISK_ALLOCATED FROM oceanbase.GV$OB_SERVERS;" global: true - type: sql sql: "SELECT * FROM oceanbase.DBA_OB_UNIT_CONFIGS;" diff --git a/handler/gather/tasks/observer/compaction.yaml b/handler/gather/tasks/observer/compaction.yaml index 3e50ec65..87f9dbbf 100644 --- a/handler/gather/tasks/observer/compaction.yaml +++ b/handler/gather/tasks/observer/compaction.yaml @@ -109,13 +109,13 @@ task: sql: "show variables like 'version_comment';" global: true - type: sql - sql: "SELECT * FROM oceanbase.DBA_OB_ZONES;" + sql: "SELECT * FROM oceanbase.DBA_OB_ZONES ORDER BY ZONE;" global: true - type: sql - sql: "SELECT * FROM oceanbase.DBA_OB_SERVERS;" + sql: "SELECT * FROM oceanbase.DBA_OB_SERVERS ORDER BY ZONE;" global: true - type: sql - sql: "SELECT * FROM oceanbase.GV$OB_SERVERS;" + sql: "SELECT SVR_IP,SVR_PORT,ZONE,SQL_PORT,CPU_CAPACITY,CPU_CAPACITY_MAX,CPU_ASSIGNED,CPU_ASSIGNED_MAX, concat(ROUND(MEM_CAPACITY/1024/1024/1024,0), 'G') as MEM_CAPACITY, concat(ROUND(MEM_ASSIGNED/1024/1024/1024,0), 'G') as MEM_ASSIGNED, concat(ROUND(LOG_DISK_CAPACITY/1024/1024/1024,0), 'G') as LOG_DISK_CAPACITY, concat(ROUND(LOG_DISK_ASSIGNED/1024/1024/1024,0), 'G') as LOG_DISK_ASSIGNED, concat(ROUND(LOG_DISK_IN_USE/1024/1024/1024,0), 'G') as LOG_DISK_IN_USE, concat(ROUND(DATA_DISK_CAPACITY/1024/1024/1024,0), 'G') as DATA_DISK_CAPACITY,concat(ROUND(DATA_DISK_IN_USE/1024/1024/1024,0), 'G') as DATA_DISK_IN_USE,concat(ROUND(MEMORY_LIMIT/1024/1024/1024,0), 'G') as MEMORY_LIMIT,concat(ROUND(DATA_DISK_ALLOCATED/1024/1024/1024,0), 'G') as DATA_DISK_ALLOCATED FROM oceanbase.GV$OB_SERVERS;" global: true - type: sql sql: "SELECT * FROM oceanbase.DBA_OB_UNIT_CONFIGS;" diff --git a/handler/gather/tasks/observer/delay_of_primary_and_backup.yaml b/handler/gather/tasks/observer/delay_of_primary_and_backup.yaml index 0693831d..70a52e65 100644 --- a/handler/gather/tasks/observer/delay_of_primary_and_backup.yaml +++ b/handler/gather/tasks/observer/delay_of_primary_and_backup.yaml @@ -118,13 +118,13 @@ task: sql: "show variables like 'version_comment';" global: true - type: sql - sql: "SELECT * FROM oceanbase.DBA_OB_ZONES;" + sql: "SELECT * FROM oceanbase.DBA_OB_ZONES ORDER BY ZONE;" global: true - type: sql - sql: "SELECT * FROM oceanbase.DBA_OB_SERVERS;" + sql: "SELECT * FROM oceanbase.DBA_OB_SERVERS ORDER BY ZONE;" global: true - type: sql - sql: "SELECT * FROM oceanbase.GV$OB_SERVERS;" + sql: "SELECT SVR_IP,SVR_PORT,ZONE,SQL_PORT,CPU_CAPACITY,CPU_CAPACITY_MAX,CPU_ASSIGNED,CPU_ASSIGNED_MAX, concat(ROUND(MEM_CAPACITY/1024/1024/1024,0), 'G') as MEM_CAPACITY, concat(ROUND(MEM_ASSIGNED/1024/1024/1024,0), 'G') as MEM_ASSIGNED, concat(ROUND(LOG_DISK_CAPACITY/1024/1024/1024,0), 'G') as LOG_DISK_CAPACITY, concat(ROUND(LOG_DISK_ASSIGNED/1024/1024/1024,0), 'G') as LOG_DISK_ASSIGNED, concat(ROUND(LOG_DISK_IN_USE/1024/1024/1024,0), 'G') as LOG_DISK_IN_USE, concat(ROUND(DATA_DISK_CAPACITY/1024/1024/1024,0), 'G') as DATA_DISK_CAPACITY,concat(ROUND(DATA_DISK_IN_USE/1024/1024/1024,0), 'G') as DATA_DISK_IN_USE,concat(ROUND(MEMORY_LIMIT/1024/1024/1024,0), 'G') as MEMORY_LIMIT,concat(ROUND(DATA_DISK_ALLOCATED/1024/1024/1024,0), 'G') as DATA_DISK_ALLOCATED FROM oceanbase.GV$OB_SERVERS;" global: true - type: sql sql: "SELECT * FROM oceanbase.DBA_OB_UNIT_CONFIGS;" diff --git a/handler/gather/tasks/observer/io.yaml b/handler/gather/tasks/observer/io.yaml index 23bab615..fa4a488e 100644 --- a/handler/gather/tasks/observer/io.yaml +++ b/handler/gather/tasks/observer/io.yaml @@ -52,13 +52,13 @@ task: sql: "show variables like 'version_comment';" global: true - type: sql - sql: "SELECT * FROM oceanbase.DBA_OB_ZONES;" + sql: "SELECT * FROM oceanbase.DBA_OB_ZONES ORDER BY ZONE;" global: true - type: sql - sql: "SELECT * FROM oceanbase.DBA_OB_SERVERS;" + sql: "SELECT * FROM oceanbase.DBA_OB_SERVERS ORDER BY ZONE;" global: true - type: sql - sql: "SELECT * FROM oceanbase.GV$OB_SERVERS;" + sql: "SELECT SVR_IP,SVR_PORT,ZONE,SQL_PORT,CPU_CAPACITY,CPU_CAPACITY_MAX,CPU_ASSIGNED,CPU_ASSIGNED_MAX, concat(ROUND(MEM_CAPACITY/1024/1024/1024,0), 'G') as MEM_CAPACITY, concat(ROUND(MEM_ASSIGNED/1024/1024/1024,0), 'G') as MEM_ASSIGNED, concat(ROUND(LOG_DISK_CAPACITY/1024/1024/1024,0), 'G') as LOG_DISK_CAPACITY, concat(ROUND(LOG_DISK_ASSIGNED/1024/1024/1024,0), 'G') as LOG_DISK_ASSIGNED, concat(ROUND(LOG_DISK_IN_USE/1024/1024/1024,0), 'G') as LOG_DISK_IN_USE, concat(ROUND(DATA_DISK_CAPACITY/1024/1024/1024,0), 'G') as DATA_DISK_CAPACITY,concat(ROUND(DATA_DISK_IN_USE/1024/1024/1024,0), 'G') as DATA_DISK_IN_USE,concat(ROUND(MEMORY_LIMIT/1024/1024/1024,0), 'G') as MEMORY_LIMIT,concat(ROUND(DATA_DISK_ALLOCATED/1024/1024/1024,0), 'G') as DATA_DISK_ALLOCATED FROM oceanbase.GV$OB_SERVERS;" global: true - type: sql sql: "SELECT * FROM oceanbase.DBA_OB_UNIT_CONFIGS;" diff --git a/handler/gather/tasks/observer/log_archive.yaml b/handler/gather/tasks/observer/log_archive.yaml index 43f128bc..2d2908f0 100644 --- a/handler/gather/tasks/observer/log_archive.yaml +++ b/handler/gather/tasks/observer/log_archive.yaml @@ -73,13 +73,13 @@ task: sql: "show variables like 'version_comment';" global: true - type: sql - sql: "SELECT * FROM oceanbase.DBA_OB_ZONES;" + sql: "SELECT * FROM oceanbase.DBA_OB_ZONES ORDER BY ZONE;" global: true - type: sql - sql: "SELECT * FROM oceanbase.DBA_OB_SERVERS;" + sql: "SELECT * FROM oceanbase.DBA_OB_SERVERS ORDER BY ZONE;" global: true - type: sql - sql: "SELECT * FROM oceanbase.GV$OB_SERVERS;" + sql: "SELECT SVR_IP,SVR_PORT,ZONE,SQL_PORT,CPU_CAPACITY,CPU_CAPACITY_MAX,CPU_ASSIGNED,CPU_ASSIGNED_MAX, concat(ROUND(MEM_CAPACITY/1024/1024/1024,0), 'G') as MEM_CAPACITY, concat(ROUND(MEM_ASSIGNED/1024/1024/1024,0), 'G') as MEM_ASSIGNED, concat(ROUND(LOG_DISK_CAPACITY/1024/1024/1024,0), 'G') as LOG_DISK_CAPACITY, concat(ROUND(LOG_DISK_ASSIGNED/1024/1024/1024,0), 'G') as LOG_DISK_ASSIGNED, concat(ROUND(LOG_DISK_IN_USE/1024/1024/1024,0), 'G') as LOG_DISK_IN_USE, concat(ROUND(DATA_DISK_CAPACITY/1024/1024/1024,0), 'G') as DATA_DISK_CAPACITY,concat(ROUND(DATA_DISK_IN_USE/1024/1024/1024,0), 'G') as DATA_DISK_IN_USE,concat(ROUND(MEMORY_LIMIT/1024/1024/1024,0), 'G') as MEMORY_LIMIT,concat(ROUND(DATA_DISK_ALLOCATED/1024/1024/1024,0), 'G') as DATA_DISK_ALLOCATED FROM oceanbase.GV$OB_SERVERS;" global: true - type: sql sql: "SELECT * FROM oceanbase.DBA_OB_UNIT_CONFIGS;" diff --git a/handler/gather/tasks/observer/long_transaction.yaml b/handler/gather/tasks/observer/long_transaction.yaml index c83afa90..cbd4c9a4 100644 --- a/handler/gather/tasks/observer/long_transaction.yaml +++ b/handler/gather/tasks/observer/long_transaction.yaml @@ -43,13 +43,13 @@ task: sql: "show variables like 'version_comment';" global: true - type: sql - sql: "SELECT * FROM oceanbase.DBA_OB_ZONES;" + sql: "SELECT * FROM oceanbase.DBA_OB_ZONES ORDER BY ZONE;" global: true - type: sql - sql: "SELECT * FROM oceanbase.DBA_OB_SERVERS;" + sql: "SELECT * FROM oceanbase.DBA_OB_SERVERS ORDER BY ZONE;" global: true - type: sql - sql: "SELECT * FROM oceanbase.GV$OB_SERVERS;" + sql: "SELECT SVR_IP,SVR_PORT,ZONE,SQL_PORT,CPU_CAPACITY,CPU_CAPACITY_MAX,CPU_ASSIGNED,CPU_ASSIGNED_MAX, concat(ROUND(MEM_CAPACITY/1024/1024/1024,0), 'G') as MEM_CAPACITY, concat(ROUND(MEM_ASSIGNED/1024/1024/1024,0), 'G') as MEM_ASSIGNED, concat(ROUND(LOG_DISK_CAPACITY/1024/1024/1024,0), 'G') as LOG_DISK_CAPACITY, concat(ROUND(LOG_DISK_ASSIGNED/1024/1024/1024,0), 'G') as LOG_DISK_ASSIGNED, concat(ROUND(LOG_DISK_IN_USE/1024/1024/1024,0), 'G') as LOG_DISK_IN_USE, concat(ROUND(DATA_DISK_CAPACITY/1024/1024/1024,0), 'G') as DATA_DISK_CAPACITY,concat(ROUND(DATA_DISK_IN_USE/1024/1024/1024,0), 'G') as DATA_DISK_IN_USE,concat(ROUND(MEMORY_LIMIT/1024/1024/1024,0), 'G') as MEMORY_LIMIT,concat(ROUND(DATA_DISK_ALLOCATED/1024/1024/1024,0), 'G') as DATA_DISK_ALLOCATED FROM oceanbase.GV$OB_SERVERS;" global: true - type: sql sql: "SELECT * FROM oceanbase.DBA_OB_UNIT_CONFIGS;" diff --git a/handler/gather/tasks/observer/memory.yaml b/handler/gather/tasks/observer/memory.yaml index 140aca02..f2650f19 100644 --- a/handler/gather/tasks/observer/memory.yaml +++ b/handler/gather/tasks/observer/memory.yaml @@ -64,13 +64,13 @@ task: sql: "show variables like 'version_comment';" global: true - type: sql - sql: "SELECT * FROM oceanbase.DBA_OB_ZONES;" + sql: "SELECT * FROM oceanbase.DBA_OB_ZONES ORDER BY ZONE;" global: true - type: sql - sql: "SELECT * FROM oceanbase.DBA_OB_SERVERS;" + sql: "SELECT * FROM oceanbase.DBA_OB_SERVERS ORDER BY ZONE;" global: true - type: sql - sql: "SELECT * FROM oceanbase.GV$OB_SERVERS;" + sql: "SELECT SVR_IP,SVR_PORT,ZONE,SQL_PORT,CPU_CAPACITY,CPU_CAPACITY_MAX,CPU_ASSIGNED,CPU_ASSIGNED_MAX, concat(ROUND(MEM_CAPACITY/1024/1024/1024,0), 'G') as MEM_CAPACITY, concat(ROUND(MEM_ASSIGNED/1024/1024/1024,0), 'G') as MEM_ASSIGNED, concat(ROUND(LOG_DISK_CAPACITY/1024/1024/1024,0), 'G') as LOG_DISK_CAPACITY, concat(ROUND(LOG_DISK_ASSIGNED/1024/1024/1024,0), 'G') as LOG_DISK_ASSIGNED, concat(ROUND(LOG_DISK_IN_USE/1024/1024/1024,0), 'G') as LOG_DISK_IN_USE, concat(ROUND(DATA_DISK_CAPACITY/1024/1024/1024,0), 'G') as DATA_DISK_CAPACITY,concat(ROUND(DATA_DISK_IN_USE/1024/1024/1024,0), 'G') as DATA_DISK_IN_USE,concat(ROUND(MEMORY_LIMIT/1024/1024/1024,0), 'G') as MEMORY_LIMIT,concat(ROUND(DATA_DISK_ALLOCATED/1024/1024/1024,0), 'G') as DATA_DISK_ALLOCATED FROM oceanbase.GV$OB_SERVERS;" global: true - type: sql sql: "SELECT * FROM oceanbase.DBA_OB_UNIT_CONFIGS;" diff --git a/handler/gather/tasks/observer/recovery.yaml b/handler/gather/tasks/observer/recovery.yaml index 6009a0d0..1d858159 100644 --- a/handler/gather/tasks/observer/recovery.yaml +++ b/handler/gather/tasks/observer/recovery.yaml @@ -54,13 +54,13 @@ task: sql: "show variables like 'version_comment';" global: true - type: sql - sql: "SELECT * FROM oceanbase.DBA_OB_ZONES;" + sql: "SELECT * FROM oceanbase.DBA_OB_ZONES ORDER BY ZONE;" global: true - type: sql - sql: "SELECT * FROM oceanbase.DBA_OB_SERVERS;" + sql: "SELECT * FROM oceanbase.DBA_OB_SERVERS ORDER BY ZONE;" global: true - type: sql - sql: "SELECT * FROM oceanbase.GV$OB_SERVERS;" + sql: "SELECT SVR_IP,SVR_PORT,ZONE,SQL_PORT,CPU_CAPACITY,CPU_CAPACITY_MAX,CPU_ASSIGNED,CPU_ASSIGNED_MAX, concat(ROUND(MEM_CAPACITY/1024/1024/1024,0), 'G') as MEM_CAPACITY, concat(ROUND(MEM_ASSIGNED/1024/1024/1024,0), 'G') as MEM_ASSIGNED, concat(ROUND(LOG_DISK_CAPACITY/1024/1024/1024,0), 'G') as LOG_DISK_CAPACITY, concat(ROUND(LOG_DISK_ASSIGNED/1024/1024/1024,0), 'G') as LOG_DISK_ASSIGNED, concat(ROUND(LOG_DISK_IN_USE/1024/1024/1024,0), 'G') as LOG_DISK_IN_USE, concat(ROUND(DATA_DISK_CAPACITY/1024/1024/1024,0), 'G') as DATA_DISK_CAPACITY,concat(ROUND(DATA_DISK_IN_USE/1024/1024/1024,0), 'G') as DATA_DISK_IN_USE,concat(ROUND(MEMORY_LIMIT/1024/1024/1024,0), 'G') as MEMORY_LIMIT,concat(ROUND(DATA_DISK_ALLOCATED/1024/1024/1024,0), 'G') as DATA_DISK_ALLOCATED FROM oceanbase.GV$OB_SERVERS;" global: true - type: sql sql: "SELECT * FROM oceanbase.DBA_OB_UNIT_CONFIGS;" diff --git a/handler/gather/tasks/observer/restart.yaml b/handler/gather/tasks/observer/restart.yaml index d8b956c6..9ada284f 100644 --- a/handler/gather/tasks/observer/restart.yaml +++ b/handler/gather/tasks/observer/restart.yaml @@ -49,13 +49,13 @@ task: sql: "show variables like 'version_comment';" global: true - type: sql - sql: "SELECT * FROM oceanbase.DBA_OB_ZONES;" + sql: "SELECT * FROM oceanbase.DBA_OB_ZONES ORDER BY ZONE;" global: true - type: sql - sql: "SELECT * FROM oceanbase.DBA_OB_SERVERS;" + sql: "SELECT * FROM oceanbase.DBA_OB_SERVERS ORDER BY ZONE;" global: true - type: sql - sql: "SELECT * FROM oceanbase.GV$OB_SERVERS;" + sql: "SELECT SVR_IP,SVR_PORT,ZONE,SQL_PORT,CPU_CAPACITY,CPU_CAPACITY_MAX,CPU_ASSIGNED,CPU_ASSIGNED_MAX, concat(ROUND(MEM_CAPACITY/1024/1024/1024,0), 'G') as MEM_CAPACITY, concat(ROUND(MEM_ASSIGNED/1024/1024/1024,0), 'G') as MEM_ASSIGNED, concat(ROUND(LOG_DISK_CAPACITY/1024/1024/1024,0), 'G') as LOG_DISK_CAPACITY, concat(ROUND(LOG_DISK_ASSIGNED/1024/1024/1024,0), 'G') as LOG_DISK_ASSIGNED, concat(ROUND(LOG_DISK_IN_USE/1024/1024/1024,0), 'G') as LOG_DISK_IN_USE, concat(ROUND(DATA_DISK_CAPACITY/1024/1024/1024,0), 'G') as DATA_DISK_CAPACITY,concat(ROUND(DATA_DISK_IN_USE/1024/1024/1024,0), 'G') as DATA_DISK_IN_USE,concat(ROUND(MEMORY_LIMIT/1024/1024/1024,0), 'G') as MEMORY_LIMIT,concat(ROUND(DATA_DISK_ALLOCATED/1024/1024/1024,0), 'G') as DATA_DISK_ALLOCATED FROM oceanbase.GV$OB_SERVERS;" global: true - type: sql sql: "SELECT * FROM oceanbase.DBA_OB_UNIT_CONFIGS;" diff --git a/handler/gather/tasks/observer/rootservice_switch.yaml b/handler/gather/tasks/observer/rootservice_switch.yaml index efda677f..be72be4e 100644 --- a/handler/gather/tasks/observer/rootservice_switch.yaml +++ b/handler/gather/tasks/observer/rootservice_switch.yaml @@ -79,13 +79,13 @@ task: sql: "show variables like 'version_comment';" global: true - type: sql - sql: "SELECT * FROM oceanbase.DBA_OB_ZONES;" + sql: "SELECT * FROM oceanbase.DBA_OB_ZONES ORDER BY ZONE;" global: true - type: sql - sql: "SELECT * FROM oceanbase.DBA_OB_SERVERS;" + sql: "SELECT * FROM oceanbase.DBA_OB_SERVERS ORDER BY ZONE;" global: true - type: sql - sql: "SELECT * FROM oceanbase.GV$OB_SERVERS;" + sql: "SELECT SVR_IP,SVR_PORT,ZONE,SQL_PORT,CPU_CAPACITY,CPU_CAPACITY_MAX,CPU_ASSIGNED,CPU_ASSIGNED_MAX, concat(ROUND(MEM_CAPACITY/1024/1024/1024,0), 'G') as MEM_CAPACITY, concat(ROUND(MEM_ASSIGNED/1024/1024/1024,0), 'G') as MEM_ASSIGNED, concat(ROUND(LOG_DISK_CAPACITY/1024/1024/1024,0), 'G') as LOG_DISK_CAPACITY, concat(ROUND(LOG_DISK_ASSIGNED/1024/1024/1024,0), 'G') as LOG_DISK_ASSIGNED, concat(ROUND(LOG_DISK_IN_USE/1024/1024/1024,0), 'G') as LOG_DISK_IN_USE, concat(ROUND(DATA_DISK_CAPACITY/1024/1024/1024,0), 'G') as DATA_DISK_CAPACITY,concat(ROUND(DATA_DISK_IN_USE/1024/1024/1024,0), 'G') as DATA_DISK_IN_USE,concat(ROUND(MEMORY_LIMIT/1024/1024/1024,0), 'G') as MEMORY_LIMIT,concat(ROUND(DATA_DISK_ALLOCATED/1024/1024/1024,0), 'G') as DATA_DISK_ALLOCATED FROM oceanbase.GV$OB_SERVERS;" global: true - type: sql sql: "SELECT * FROM oceanbase.DBA_OB_UNIT_CONFIGS;" diff --git a/handler/gather/tasks/observer/suspend_transaction.yaml b/handler/gather/tasks/observer/suspend_transaction.yaml index 25a9edb3..59001c27 100644 --- a/handler/gather/tasks/observer/suspend_transaction.yaml +++ b/handler/gather/tasks/observer/suspend_transaction.yaml @@ -43,13 +43,13 @@ task: sql: "show variables like 'version_comment';" global: true - type: sql - sql: "SELECT * FROM oceanbase.DBA_OB_ZONES;" + sql: "SELECT * FROM oceanbase.DBA_OB_ZONES ORDER BY ZONE;" global: true - type: sql - sql: "SELECT * FROM oceanbase.DBA_OB_SERVERS;" + sql: "SELECT * FROM oceanbase.DBA_OB_SERVERS ORDER BY ZONE;" global: true - type: sql - sql: "SELECT * FROM oceanbase.GV$OB_SERVERS;" + sql: "SELECT SVR_IP,SVR_PORT,ZONE,SQL_PORT,CPU_CAPACITY,CPU_CAPACITY_MAX,CPU_ASSIGNED,CPU_ASSIGNED_MAX, concat(ROUND(MEM_CAPACITY/1024/1024/1024,0), 'G') as MEM_CAPACITY, concat(ROUND(MEM_ASSIGNED/1024/1024/1024,0), 'G') as MEM_ASSIGNED, concat(ROUND(LOG_DISK_CAPACITY/1024/1024/1024,0), 'G') as LOG_DISK_CAPACITY, concat(ROUND(LOG_DISK_ASSIGNED/1024/1024/1024,0), 'G') as LOG_DISK_ASSIGNED, concat(ROUND(LOG_DISK_IN_USE/1024/1024/1024,0), 'G') as LOG_DISK_IN_USE, concat(ROUND(DATA_DISK_CAPACITY/1024/1024/1024,0), 'G') as DATA_DISK_CAPACITY,concat(ROUND(DATA_DISK_IN_USE/1024/1024/1024,0), 'G') as DATA_DISK_IN_USE,concat(ROUND(MEMORY_LIMIT/1024/1024/1024,0), 'G') as MEMORY_LIMIT,concat(ROUND(DATA_DISK_ALLOCATED/1024/1024/1024,0), 'G') as DATA_DISK_ALLOCATED FROM oceanbase.GV$OB_SERVERS;" global: true - type: sql sql: "SELECT * FROM oceanbase.DBA_OB_UNIT_CONFIGS;" diff --git a/handler/gather/tasks/observer/unit_data_imbalance.yaml b/handler/gather/tasks/observer/unit_data_imbalance.yaml index 078ec631..b9e7b54e 100644 --- a/handler/gather/tasks/observer/unit_data_imbalance.yaml +++ b/handler/gather/tasks/observer/unit_data_imbalance.yaml @@ -100,13 +100,13 @@ task: sql: "show variables like 'version_comment';" global: true - type: sql - sql: "SELECT * FROM oceanbase.DBA_OB_ZONES;" + sql: "SELECT * FROM oceanbase.DBA_OB_ZONES ORDER BY ZONE;" global: true - type: sql - sql: "SELECT * FROM oceanbase.DBA_OB_SERVERS;" + sql: "SELECT * FROM oceanbase.DBA_OB_SERVERS ORDER BY ZONE;" global: true - type: sql - sql: "SELECT * FROM oceanbase.GV$OB_SERVERS;" + sql: "SELECT SVR_IP,SVR_PORT,ZONE,SQL_PORT,CPU_CAPACITY,CPU_CAPACITY_MAX,CPU_ASSIGNED,CPU_ASSIGNED_MAX, concat(ROUND(MEM_CAPACITY/1024/1024/1024,0), 'G') as MEM_CAPACITY, concat(ROUND(MEM_ASSIGNED/1024/1024/1024,0), 'G') as MEM_ASSIGNED, concat(ROUND(LOG_DISK_CAPACITY/1024/1024/1024,0), 'G') as LOG_DISK_CAPACITY, concat(ROUND(LOG_DISK_ASSIGNED/1024/1024/1024,0), 'G') as LOG_DISK_ASSIGNED, concat(ROUND(LOG_DISK_IN_USE/1024/1024/1024,0), 'G') as LOG_DISK_IN_USE, concat(ROUND(DATA_DISK_CAPACITY/1024/1024/1024,0), 'G') as DATA_DISK_CAPACITY,concat(ROUND(DATA_DISK_IN_USE/1024/1024/1024,0), 'G') as DATA_DISK_IN_USE,concat(ROUND(MEMORY_LIMIT/1024/1024/1024,0), 'G') as MEMORY_LIMIT,concat(ROUND(DATA_DISK_ALLOCATED/1024/1024/1024,0), 'G') as DATA_DISK_ALLOCATED FROM oceanbase.GV$OB_SERVERS;" global: true - type: sql sql: "SELECT * FROM oceanbase.DBA_OB_UNIT_CONFIGS;" diff --git a/handler/gather/tasks/observer/unknown.yaml b/handler/gather/tasks/observer/unknown.yaml index 780a3f75..3d22f9af 100644 --- a/handler/gather/tasks/observer/unknown.yaml +++ b/handler/gather/tasks/observer/unknown.yaml @@ -46,13 +46,13 @@ task: sql: "show variables like 'version_comment';" global: true - type: sql - sql: "SELECT * FROM oceanbase.DBA_OB_ZONES;" + sql: "SELECT * FROM oceanbase.DBA_OB_ZONES ORDER BY ZONE;" global: true - type: sql - sql: "SELECT * FROM oceanbase.DBA_OB_SERVERS;" + sql: "SELECT * FROM oceanbase.DBA_OB_SERVERS ORDER BY ZONE;" global: true - type: sql - sql: "SELECT * FROM oceanbase.GV$OB_SERVERS;" + sql: "SELECT SVR_IP,SVR_PORT,ZONE,SQL_PORT,CPU_CAPACITY,CPU_CAPACITY_MAX,CPU_ASSIGNED,CPU_ASSIGNED_MAX, concat(ROUND(MEM_CAPACITY/1024/1024/1024,0), 'G') as MEM_CAPACITY, concat(ROUND(MEM_ASSIGNED/1024/1024/1024,0), 'G') as MEM_ASSIGNED, concat(ROUND(LOG_DISK_CAPACITY/1024/1024/1024,0), 'G') as LOG_DISK_CAPACITY, concat(ROUND(LOG_DISK_ASSIGNED/1024/1024/1024,0), 'G') as LOG_DISK_ASSIGNED, concat(ROUND(LOG_DISK_IN_USE/1024/1024/1024,0), 'G') as LOG_DISK_IN_USE, concat(ROUND(DATA_DISK_CAPACITY/1024/1024/1024,0), 'G') as DATA_DISK_CAPACITY,concat(ROUND(DATA_DISK_IN_USE/1024/1024/1024,0), 'G') as DATA_DISK_IN_USE,concat(ROUND(MEMORY_LIMIT/1024/1024/1024,0), 'G') as MEMORY_LIMIT,concat(ROUND(DATA_DISK_ALLOCATED/1024/1024/1024,0), 'G') as DATA_DISK_ALLOCATED FROM oceanbase.GV$OB_SERVERS;" global: true - type: sql sql: "SELECT * FROM oceanbase.DBA_OB_UNIT_CONFIGS;" diff --git a/handler/gather/tasks/other/application_error.yaml b/handler/gather/tasks/other/application_error.yaml index 41a421bd..98b87e23 100644 --- a/handler/gather/tasks/other/application_error.yaml +++ b/handler/gather/tasks/other/application_error.yaml @@ -46,13 +46,13 @@ task: sql: "show variables like 'version_comment';" global: true - type: sql - sql: "SELECT * FROM oceanbase.DBA_OB_ZONES;" + sql: "SELECT * FROM oceanbase.DBA_OB_ZONES ORDER BY ZONE;" global: true - type: sql - sql: "SELECT * FROM oceanbase.DBA_OB_SERVERS;" + sql: "SELECT * FROM oceanbase.DBA_OB_SERVERS ORDER BY ZONE;" global: true - type: sql - sql: "SELECT * FROM oceanbase.GV$OB_SERVERS;" + sql: "SELECT SVR_IP,SVR_PORT,ZONE,SQL_PORT,CPU_CAPACITY,CPU_CAPACITY_MAX,CPU_ASSIGNED,CPU_ASSIGNED_MAX, concat(ROUND(MEM_CAPACITY/1024/1024/1024,0), 'G') as MEM_CAPACITY, concat(ROUND(MEM_ASSIGNED/1024/1024/1024,0), 'G') as MEM_ASSIGNED, concat(ROUND(LOG_DISK_CAPACITY/1024/1024/1024,0), 'G') as LOG_DISK_CAPACITY, concat(ROUND(LOG_DISK_ASSIGNED/1024/1024/1024,0), 'G') as LOG_DISK_ASSIGNED, concat(ROUND(LOG_DISK_IN_USE/1024/1024/1024,0), 'G') as LOG_DISK_IN_USE, concat(ROUND(DATA_DISK_CAPACITY/1024/1024/1024,0), 'G') as DATA_DISK_CAPACITY,concat(ROUND(DATA_DISK_IN_USE/1024/1024/1024,0), 'G') as DATA_DISK_IN_USE,concat(ROUND(MEMORY_LIMIT/1024/1024/1024,0), 'G') as MEMORY_LIMIT,concat(ROUND(DATA_DISK_ALLOCATED/1024/1024/1024,0), 'G') as DATA_DISK_ALLOCATED FROM oceanbase.GV$OB_SERVERS;" global: true - type: sql sql: "SELECT * FROM oceanbase.DBA_OB_UNIT_CONFIGS;"