From 19f9c54d641c602d64515d6cea47c3d6d1889444 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=9B=AA=E6=9F=93?= Date: Tue, 12 Jul 2022 16:57:59 +0800 Subject: [PATCH] update obagent query response time config --- etc/module_config/monitor_ob.yaml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/etc/module_config/monitor_ob.yaml b/etc/module_config/monitor_ob.yaml index 33d62d6..356a041 100644 --- a/etc/module_config/monitor_ob.yaml +++ b/etc/module_config/monitor_ob.yaml @@ -90,14 +90,16 @@ obInputBasic: &obInputBasic metrics: wait_total: total_waits wait_seconds_total: time_waited - - sql: select /*+ MONITOR_AGENT READ_CONSISTENCY(WEAK) */ tenant_name, response_time / 1000000 as response_time, count, total from __all_virtual_query_response_time join __all_tenant on __all_virtual_query_response_time.tenant_id = __all_tenant.tenant_id - name: ob_query_response_time + - sql: select /*+ MONITOR_AGENT READ_CONSISTENCY(WEAK) */ __all_tenant.tenant_name as tenant_name, cast(v_acc_response_time.response_time / 1000000 as float) as response_time_seconds, v_acc_response_time.count as bucket, case when v_acc_response_time.response_time = (select max(response_time) from __all_virtual_query_response_time) then v_acc_response_time.count else null end as count, case when v_acc_response_time.response_time = (select max(response_time) from __all_virtual_query_response_time) then cast(v_acc_response_time.sum / 1000000 as float) else null end as sum from (select b.tenant_id, b.response_time as response_time, sum(a.count) as count, sum(a.total) as sum from __all_virtual_query_response_time a, __all_virtual_query_response_time b where a.response_time <= b.response_time and a.svr_ip = b.svr_ip and a.svr_port = b.svr_port and b.svr_ip = ? and b.svr_port = ? group by b.tenant_id, b.response_time) v_acc_response_time, __all_tenant where v_acc_response_time.tenant_id = __all_tenant.tenant_id; + params: [ob_svr_ip, ob_svr_port] + name: ob_query_response_time_seconds tags: tenant_name: tenant_name - le: response_time + le: response_time_seconds metrics: + bucket: bucket count: count - total: total + sum: sum obInputExtra: &obInputExtra plugin: mysqlTableInput -- GitLab