更新时间:2024-12-10 GMT+08:00
LTS仪表盘模板
LTS仪表盘模板主要介绍OBS导入任务监控仪表盘,例如查看OBS导入LTS的任务ID、任务名称、成功条数、失败条数、处理速率等,及时发现数据导入过程中可能出现的异常问题。
前提条件
OBS已接入LTS,详细请参考对象存储服务OBS接入LTS(邀测)。
OBS导入任务监控仪表盘
- 登录云日志服务控制台。
- 在左侧导航栏中选择“仪表盘 ”。
- 在仪表盘模板下方,选择“LTS仪表盘模板”。
- 在仪表盘列表页面,单击“OBS导入任务监控仪表盘”仪表盘名称,查看图表详情。
- 过滤任务ID,所关联的查询分析语句如下所示:
* | select task_set_id group by task_set_id
- 过滤任务名称,所关联的查询分析语句如下所示:
* | select task_set_name group by task_set_name
- 成功条数图表所关联的查询分析语句如下所示:
* | select sum(max_read_line) as \"成功条数\" from (select max_by(read_lines,__time) as max_read_line group by task_set_id,period_times limit 10000)
- 失败条数图表所关联的查询分析语句如下所示:
* | select sum(max_failure_lines) as \"失败条数\" from (select max_by(failure_lines,__time) as max_failure_lines group by task_set_id,period_times limit 10000)
- 读流量图表所关联的查询分析语句如下所示:
* | select sum(max_in_flow)/1024.0/1024 as \"读流量 MB\" from (select max_by(in_flow,__time) as max_in_flow group by task_set_id,period_times limit 10000)
- 写流量图表所关联的查询分析语句如下所示:
* | select sum(max_out_flow)/1024.0/1024 as \"写流量 MB\" from (select max_by(out_flow,__time) as max_out_flow group by task_set_id,period_times limit 10000)
- 处理速率图表所关联的查询分析语句如下所示:
* | SELECT t AS "统计时间", ROUND(( CASE WHEN diff [ 1 ] IS NOT NULL AND diff [ 2 ] IS NOT NULL AND diff [ 1 ] - diff [ 2 ] > 0 THEN diff [ 1 ] - diff [ 2 ] WHEN diff [ 1 ] IS NOT NULL AND diff [ 2 ] IS NULL THEN diff [ 1 ] ELSE 0 END ) / 300,0) AS "成功条数/s" FROM ( SELECT t, ts_compare ( max_read_lines, 300 ) AS diff FROM ( SELECT t, sum( max_read_lines ) AS max_read_lines FROM ( SELECT from_unixtime( __time - __time % 300000 ) AS t, max_by ( read_lines, __time ) AS max_read_lines, task_set_id, period_times GROUP BY t, task_set_id, period_times LIMIT 10000 ) GROUP BY t ORDER BY t ) GROUP BY t ORDER BY t LIMIT 10000 ) LIMIT 10000
- 运行异常图表所关联的查询分析语句如下所示:
* | select task_set_name as "任务名称",task_set_id as "任务ID" , max_by(task_set_state,__time ) as "任务状态" , from_unixtime(max(__time)) as "采集时间" , max_by(failure_lines,__time) as "失败读取条数" group by task_set_id,task_set_name HAVING "任务状态" = 'UNHEALTHY' OR "任务状态" = 'FAILURE' limit 10000
- 运行状态图表所关联的查询分析语句如下所示:
* | select task_set_name as "任务名称",task_set_id as "任务ID" , max_by(task_set_state,__time ) as "任务状态" , max_by(read_lines,__time) as "成功条数" ,max_by(failure_lines,__time) as "失败条数" , max_by(in_flow,__time)/1024/1024 as "读流量/MB" , max_by(out_flow,__time)/1024/1024 as "写流量/MB",period_times as "周期" group by task_set_id,task_set_name,period_times order by max(__time),task_set_id,period_times limit 10000
- 过滤任务ID,所关联的查询分析语句如下所示:
父主题: 日志仪表盘模板