更新时间:2024-07-11 GMT+08:00
ICAgent异常监控
云日志服务支持ICAgent异常监控仪表盘模板,用于展示关键错误数、丢弃超大行、请求LTS失败、文件超过上限问题数等图表。
前提条件
在LTS控制台配置中心页面的“ICAgent采集开关”页签,开启ICAgent诊断开关,请参考设置ICAgent日志采集开关。
分析网站访问情况
- 登录云日志服务控制台。
- 在左侧导航栏中选择“仪表盘 ”。
- 在仪表盘模板下方,选择“采集诊断仪表盘模板>ICAgent异常监控”仪表盘,查看图表详情。
ICAgent异常监控仪表盘中的过滤器说明如下所示:
- 日志组ID,所关联的查询分析语句如下所示:
select loggroup from log where report_topic = 'icagent_profile' or report_topic = 'icagent_alarm' group by loggroup limit 10000
- 日志流ID,所关联的查询分析语句如下所示:
select logstream from log where report_topic = 'icagent_profile' or report_topic = 'icagent_alarm' group by logstream limit 10000
ICAgent异常监控仪表盘中的重要图表说明如下所示:
- 关键错误数图展示关键错误的变化情况,所关联的查询分析语句如下所示:
select diff[1] as "错误数", case when diff[3] is not null then round(diff[3] - 1 , 2) else '昨日无数据' end as "错误数对比昨天" from (select report_topic,compare(pv , 86400) as diff from (select report_topic,count(1) as pv from log where report_topic = 'icagent_alarm' group by report_topic) group by report_topic)
- 丢弃超大行图展示丢弃超大行的变化情况,所关联的查询分析语句如下所示
select diff[1] as "丢弃行数" , case when diff[3] is not null then round(diff[3] - 1 , 2) else '昨日无数据' end as "丢弃行数对比昨天" from (select report_topic,compare(pv , 400) as diff from (select report_topic,count(1) as pv from log where report_topic = 'icagent_alarm' and alarm_type = 'DISCARD_BIG_LINE' group by report_topic) group by report_topic)
- 请求LTS失败图展示请求LTS失败的变化情况,所关联的查询分析语句如下所示:
select diff[1] as "请求失败数" , case when diff[3] is not null then round(diff[3] - 1 , 2) else '昨日无数据' end as "请求失败数对比昨天" from (select report_topic,compare(pv , 86400) as diff from (select report_topic,count(1) as pv from log where report_topic = 'icagent_alarm' and alarm_type = 'HTTP_REQUEST_ALARM' group by report_topic) group by report_topic)
- 文件超过上限问题数图展示文件超过上限的变化情况,所关联的查询分析语句如下所示:
select diff[1] as "文件超过上限问题数" ,case when diff[3] is not null then round(diff[3] - 1 , 2) else '昨日无数据' end as "文件超过上限问题数对比昨天" from (select report_topic,compare(pv , 86400) as diff from (select report_topic,count(1) as pv from log where report_topic = 'icagent_alarm' and alarm_type = 'COLLECT_FILE_EXCEED' group by report_topic) group by report_topic)
- 关键错误数(必需处理)图展示关键错误的整体情况,所关联的查询分析语句如下所示:
select TIME_FORMAT(MILLIS_TO_TIMESTAMP(ANY_VALUE(report_time/1000000)),'yyyy/MM/dd HH:mm:ss ZZ') as "最近发生时间" , loggroup as "日志组ID" ,logstream as "日志流ID" , host_ip as "IP" , alarm_type as "告警类型", os as "系统类型" , alarm_message as "告警详情" where report_topic = 'icagent_alarm' group by loggroup,logstream,host_ip,alarm_type,os,alarm_message limit 10000
- 丢弃超大行详情图展示丢弃超大行详情,所关联的查询分析语句如下所示:
select TIME_FORMAT(MILLIS_TO_TIMESTAMP(ANY_VALUE(report_time/1000000)),'yyyy/MM/dd HH:mm:ss ZZ') as "最近发生时间" , loggroup as "日志组ID" ,logstream as "日志流ID" , host_ip as "IP" , alarm_type as "告警类型", os as "系统类型" , alarm_message as "告警详情" where report_topic = 'icagent_alarm' and alarm_type = 'DISCARD_BIG_LINE' group by loggroup,logstream,host_ip,alarm_type,os,alarm_message limit 10000
- 请求LTS失败详情图展示发生时间、告警类型、告警详情等信息,所关联的查询分析语句如下所示:
select TIME_FORMAT(MILLIS_TO_TIMESTAMP(ANY_VALUE(report_time/1000000)),'yyyy/MM/dd HH:mm:ss ZZ') as "最近发生时间" , loggroup as "日志组ID" ,logstream as "日志流ID" , host_ip as "IP" , alarm_type as "告警类型", os as "系统类型" , alarm_message as "告警详情" where report_topic = 'icagent_alarm' and alarm_type = 'HTTP_REQUEST_ALARM' group by loggroup,logstream,host_ip,alarm_type,os,alarm_message limit 10000
- 文件超过上限问题数详情图展示发生时间、告警类型、告警详情等信息,所关联的查询分析语句如下所示:
select TIME_FORMAT(MILLIS_TO_TIMESTAMP(ANY_VALUE(report_time/1000000)),'yyyy/MM/dd HH:mm:ss ZZ') as "最近发生时间" , loggroup as "日志组ID" ,logstream as "日志流ID" , host_ip as "IP" , alarm_type as "告警类型", os as "系统类型" , alarm_message as "告警详情" where report_topic = 'icagent_alarm' and alarm_type = 'COLLECT_FILE_EXCEED' group by loggroup,logstream,host_ip,alarm_type,os,alarm_message limit 10000
父主题: 采集诊断仪表盘模板