欢迎访问 OceanBase 官网获取更多信息:https://www.oceanbase.com/
指标介绍
OceanBase 集群每秒处理 SQL 语句的次数。
指标参数说明
指标项 | 指标名称 | 单位 |
|---|---|---|
all | sql_all_count | 次 |
计算表达式
sum(rate(ob_sysstat{stat_id="40000",@LABELS}[@INTERVAL])) by (@GBLABELS) + sum(rate(ob_sysstat{stat_id="40002",@LABELS}[@INTERVAL])) by (@GBLABELS) + sum(rate(ob_sysstat{stat_id="40004",@LABELS}[@INTERVAL])) by (@GBLABELS) + sum(rate(ob_sysstat{stat_id="40006",@LABELS}[@INTERVAL])) by (@GBLABELS) + sum(rate(ob_sysstat{stat_id="40008",@LABELS}[@INTERVAL])) by (@GBLABELS) R_FILL_0_ADD sum(rate(ob_sysstat{stat_id="40018",@LABELS}[@INTERVAL])) by (@GBLABELS)
SQL 采集
- OceanBase V4.0 以下版本:
- select /*+ MONITOR_AGENT READ_CONSISTENCY(WEAK) */ con_id tenant_id, stat_id, value from v$sysstat where stat_id IN (40000, 40002, 40004, 40006, 40008, 40018) and (con_id > 1000 or con_id = 1) and class < 1000
- OceanBase V4.0 及以上版本:
- select /* MONITOR_AGENT */ con_id tenant_id, stat_id, value from v$sysstat, DBA_OB_TENANTS where stat_id IN (40000, 40002, 40004, 40006, 40008, 40018) and (con_id > 1000 or con_id = 1) and class < 1000
select
指标介绍
每秒处理 SELECT 语句次数。
指标参数说明
指标项 | 指标名称 | 单位 |
|---|---|---|
select | sql_select_count | 次 |
计算表达式
sum(rate(ob_sysstat{stat_id="40000",@LABELS}[@INTERVAL])) by (@GBLABELS)
SQL 采集
- OceanBase V4.0 以下版本:
- select /*+ MONITOR_AGENT READ_CONSISTENCY(WEAK) */ con_id tenant_id, stat_id, value from v$sysstat where stat_id IN (40000) and (con_id > 1000 or con_id = 1) and class < 1000
- OceanBase V4.0 及以上版本:
- select /* MONITOR_AGENT */ con_id tenant_id, stat_id, value from v$sysstat, DBA_OB_TENANTS where stat_id IN (40000) and (con_id > 1000 or con_id = 1) and class < 1000
insert
指标介绍
每秒处理 INSERT 语句次数。
指标参数说明
指标项 | 指标名称 | 单位 |
|---|---|---|
insert | sql_insert_count | 次 |
计算表达式
sum(rate(ob_sysstat{stat_id="40002",@LABELS}[@INTERVAL])) by (@GBLABELS)
SQL 采集
- OceanBase V4.0 以下版本:
- select /*+ MONITOR_AGENT READ_CONSISTENCY(WEAK) */ con_id tenant_id, stat_id, value from v$sysstat where stat_id IN (40002) and (con_id > 1000 or con_id = 1) and class < 1000
- OceanBase V4.0 及以上版本:
- select /* MONITOR_AGENT */ con_id tenant_id, stat_id, value from v$sysstat, DBA_OB_TENANTS where stat_id IN (40002) and (con_id > 1000 or con_id = 1) and class < 1000
replace
指标介绍
每秒处理 REPLACE 语句次数。
指标参数说明
指标项 | 指标名称 | 单位 |
|---|---|---|
replace | sql_replace_count | 次 |
计算表达式
sum(rate(ob_sysstat{stat_id="40004",@LABELS}[@INTERVAL])) by (@GBLABELS)
SQL 采集
- OceanBase V4.0 以下版本:
- select /*+ MONITOR_AGENT READ_CONSISTENCY(WEAK) */ con_id tenant_id, stat_id, value from v$sysstat where stat_id IN (40004) and (con_id > 1000 or con_id = 1) and class < 1000
- OceanBase V4.0 及以上版本:
- select /* MONITOR_AGENT */ con_id tenant_id, stat_id, value from v$sysstat, DBA_OB_TENANTS where stat_id IN (40004) and (con_id > 1000 or con_id = 1) and class < 1000
update
指标介绍
每秒处理 UPDATE 语句次数。
指标参数说明
指标项 | 指标名称 | 单位 |
|---|---|---|
update | sql_update_count | 次 |
计算表达式
sum(rate(ob_sysstat{stat_id="40006",@LABELS}[@INTERVAL])) by (@GBLABELS)
SQL 采集
- OceanBase V4.0 以下版本:
- select /*+ MONITOR_AGENT READ_CONSISTENCY(WEAK) */ con_id tenant_id, stat_id, value from v$sysstat where stat_id IN (40006) and (con_id > 1000 or con_id = 1) and class < 1000
- OceanBase V4.0 及以上版本:
- select /* MONITOR_AGENT */ con_id tenant_id, stat_id, value from v$sysstat, DBA_OB_TENANTS where stat_id IN (40006) and (con_id > 1000 or con_id = 1) and class < 1000
delete
指标介绍
每秒处理 DELETE 语句次数。
指标参数说明
指标项 | 指标名称 | 单位 |
|---|---|---|
delete | sql_delete_count | 次 |
计算表达式
sum(rate(ob_sysstat{stat_id="40008",@LABELS}[@INTERVAL])) by (@GBLABELS)
SQL 采集
- OceanBase V4.0 以下版本:
- select /*+ MONITOR_AGENT READ_CONSISTENCY(WEAK) */ con_id tenant_id, stat_id, value from v$sysstat where stat_id IN (40008) and (con_id > 1000 or con_id = 1) and class < 1000
- OceanBase V4.0 及以上版本:
- select /* MONITOR_AGENT */ con_id tenant_id, stat_id, value from v$sysstat, DBA_OB_TENANTS where stat_id IN (40008) and (con_id > 1000 or con_id = 1) and class < 1000
other
指标介绍
每秒处理 DDL、DCL、DTL 等其他语句次数。
指标参数说明
指标项 | 指标名称 | 单位 |
|---|---|---|
other | sql_other_count | 次 |
计算表达式
sum(rate(ob_sysstat{stat_id="40018",@LABELS}[@INTERVAL])) by (@GBLABELS)
采集 SQL
- OceanBase V4.0 以下版本:
- select /*+ MONITOR_AGENT READ_CONSISTENCY(WEAK) */ con_id tenant_id, stat_id, value from v$sysstat where stat_id IN (40018) and (con_id > 1000 or con_id = 1) and class < 1000
- OceanBase V4.0 及以上版本:
select /* MONITOR_AGENT */ con_id tenant_id, stat_id, value from v$sysstat, DBA_OB_TENANTS
欢迎访问 OceanBase 官网获取更多信息:https://www.oceanbase.com/




