Doris监控项优化

165 阅读8分钟

优先级: P0:高优先级(高优先级:指标超限会对集群产生性能影响,或进行巡检时需要根据该指标评估集群运行状况)。

P1:中优先级(中等优先级:在集群出现故障或告警时,需要该指标辅助问题定位)。 P2:低优先级(低优先级)。




监控项优化建议

  1. 将现有FE,BE性能、状态监控项合并至一个面板,方便观察及评估集群健康状态,提升高优先级监控项在面板中占比大小,方便在集群出现性能问题排查。
  2. 将Tasks、Query、Jbos、Transactions版块组合创建一个面板。方便业务观察作业运行情况,同时方便巡检时能关注核心性能指标。
  3. 检查当前FE面板中172.16.71.10的监控状态,该机器的监控数据无法获取。该FE节点当前处于正常状态。
  4. 根据实际需要适当删减低优先级指标,简化监控面板,降低阅读难度。



当前监控项(根据Grafana版块进行划分)

Cluster Overview

监控项名称监控项含义优先级告警阈值
FENode总的FE节点数P1
FE Alive当前正常的FE节点数P0<集群节点数量,节点掉线立即告警
BE Node集群中BE的节点总数P1
BE Alive当前集群充正常存活的BE节点数,如果这个数量和BE Node的数量不一致说明集群中有掉线的BE节点,需要去查看处理P0<集群节点数量,节点掉线立即告警
Uesd Capacity当前集群已使用的磁盘空间P070%集群磁盘容量
Total Capacity集群整体存储空间P1
BE Compaction Score数据合并压力,正常这个值在100以内算是正常,不过如果持续接近100这个值。如果呈上升态势,或在平稳状态但数值较高,则需要考虑调整 Compaction 参数以加快 Compaction 的进度。P0>800立即触发 正常范围不超过100,在集群有大量导入任务时>1000会出现报错。
QPS并发量P0
99th Latency慢查询定位P0

Host Moniter

监控项名称监控项含义优先级告警阈值
CPU Used RateCPU使用率P0连续3分钟>90%
Mem Usage内存使用P1
Mem Used Rate内存使用率P0连续3分钟>90%
I/O UtilIO繁忙P0连续3分钟>80%
Disk Used Rate磁盘使用率P0>75%
Disk Write Throughput磁盘写吞吐量P1
Disk Read Throughput磁盘读吞吐量P1
Network Outbound Traffic网络上行P1
Network Intbound Traffic网络下行P1

FE监控指标

监控项名称监控项含义优先级告警阈值PromQLPromQL参数
Max Replayed Journal ID用于观察多个FE之间的 id 是否差距过大。过大则表示元数据同步出现问题P0各个节点id值相差超过500doris_fe_max_journal_id{job="$cluster_id"}
Edit log Size用于监控editlog 大小。如果大小超限,需人工介入P0doris_fe_edit_log{job="$cluster_id", type="current_bytes"}{type="accumulated_bytes"}日志累计写入量{type="current_bytes"}日志当前值{type="read"}元数据日志读取次数的计数{type="write"}元数据日志写入次数的计数
Image Write生成元数据镜像文件成功/失败的次数,不应失败,如失败,需人工介入P0失败次数>=1doris_fe_image_write{job="$cluster_id", type="success"}{type="failed"}成功{type="success"}失败
Image Push将元数据镜像文件推送给其他FE节点的成功/失败的次数P0失败次数>=1doris_fe_image_push{job="$cluster_id", type="success"}{type="failed"}成功{type="success"}失败
Image CounterDoris Master FE 元数据image生成计数器。这些指标预计会以合理的时间间隔增加通常,它们应该相等。P1doris_fe_image_write{job="clusterid",instance="cluster_id", instance="fe_master"}{type="failed"}成功{type="success"}失败
Image Clean清理历史元数据镜像文件失败的次数,不应失败,如失败,需人工介入P0doris_fe_image_clean{job="$cluster_id", type="success"}{type="failed"}成功{type="success"}失败
Edit Log Clean清理历史元数据日志成功/失败的次数,不应失败,如失败,需人工介入P0doris_fe_edit_log_clean{job="$cluster_id", type="success"}{type="failed"}成功{type="success"}失败
BDBJE Write日志写入量/写入延迟P0rate(doris_fe_edit_log{job="cluster_id", type="write"}[interval]){type="accumulated_bytes"}日志累计写入量{type="current_bytes"}日志当前值{type="read"}元数据日志读取次数的计数{type="write"}元数据日志写入次数的计数
BDBJE Read日志读取量/读取延迟P0rate(doris_fe_edit_log{job="cluster_id", type="read"}[interval]){type="accumulated_bytes"}日志累计写入量{type="current_bytes"}日志当前值{type="read"}元数据日志读取次数的计数{type="write"}元数据日志写入次数的计数
JVM HeapJVM 内存监控。标签包含 max, used, committed,分别对应最大值,已使用和已申请的内存。观测JVM内存使用情况P0连续3分钟>85%jvm_heap_size_bytes{instance="feinstance",job="fe_instance", job="cluster_id", type="used"}{type="max"}{type="used"}{type="committed"}
Scheduling TabletsMaster FE节点正在调度的 tablet 数量。包括正在修复的副本和正在均衡的副本。该数值可以反映当前集群,正在迁移的 tablet 数量。如果长时间有值,说明集群不稳定P0doris_fe_scheduled_tablet_num{job="clusterid",instance="cluster_id", instance="fe_master"}
JVM Old GCJVM老年代垃圾回收P0jvm_old_gc{job="clusterid",instance="cluster_id", instance="fe_instance", type="count"}type="count"
JVM Young GCJVM新生代垃圾回收P0jvm_young_gc{job="clusterid",instance="cluster_id", instance="fe_instance", type="count"}type="count"
JVM OldJVM 老年代内存统计P0jvm_old_size_bytes{job="clusterid",instance="cluster_id", instance="fe_instance", type="used"}{type="max"}{type="used"}{type="committed"}
JVM YoungJVM 新生代内存统计P0jvm_young_size_bytes{job="clusterid",instance="cluster_id", instance="fe_instance", type="used"}{type="max"}{type="used"}{type="committed"}
FE Collect Compaction Score所有BE节点中最大的 compaction score 值。该值可以观测当前集群最大的 compaction score,以判断是否过高。如过高则可能出现查询或写入延迟P1>800立即触发 正常范围不超过100,在集群有大量导入任务时>1000会出现报错。doris_fe_max_tablet_compaction_score{job="$cluster_id"}
JVM Non HeapJVM 堆外内存统计P1jvm_non_heap_size_bytes{instance="feinstance",job="fe_instance", job="cluster_id", type="used"}type="used"
JVM ThreadsJVM 线程数统计,观测 JVM 线程数是否合理P1jvm_thread{job="clusterid",group="fe",instance="cluster_id", group="fe", instance="fe_instance", type="count"}type="count"

BE监控指标

监控项名称监控项含义优先级告警阈值PromQLPromQL参数
Disk Usage磁盘使用率P0>75%(SUM(doris_be_disks_total_capacity{job="clusterid",instance= "cluster_id", instance=~"be_instance"}) by (instance, path) - SUM(doris_be_disks_avail_capacity{job="cluster_name"}) by (instance, path)) / SUM(doris_be_disks_total_capacity{job="cluster_id", instance=~"$be_instance"}) by (instance, path)
BE FD CountBE 进程已使用的文件句柄数。通过 /proc/pid/limits 采集P2doris_be_process_fd_num_used{job="clusterid",group="be",instance= "cluster_id", group="be", instance=~"be_instance"}
BE Thread NumBE 进程线程数。通过 /proc/pid/task 采集P1doris_be_process_thread_num{job="clusterid",group="be",instance= "cluster_id", group="be", instance=~"be_instance"}
Tablet Meta Read访问 RocksDB 中的 meta 的次数累计,通过斜率观测 BE 元数据访问频率P1irate(doris_be_meta_request_total{job="clusterid",instance= "cluster_id", instance=~"be_instance", type="read"}[$interval]){type="write"}读取{type="write"}写入
Tablet Meta Write访问 RocksDB 中的 meta 的次数累计,通过斜率观测 BE 元数据写入频率P1doris_be_meta_request_total{job="clusterid",instance= "cluster_id", instance=~"be_instance", type="read"}[$interval]{type="write"}读取{type="write"}写入
Tablet Distribution各个BE节点当前tablet总数。 可以查看 tablet 分布是否均匀以及绝对值是否合理P0doris_fe_tablet_num{job="clusterid",instance="cluster_id", instance="fe_master"}
BE Compaction Base记录的是 compaction 任务中,input rowset 的 disk size。通过斜率可以观测 compaction的速率P1rate(doris_be_compaction_bytes_total{type="cumulative", job="clusterid",instance= "cluster_id", instance=~"be_instance"}[$interval])type="cumulative"type="base"
BE Push BytesBE推送任务速率P2rate(doris_be_push_request_write_bytes{job="clusterid",instance= "cluster_id", instance=~"be_instance"}[$interval])
BE Push RowsBE推送任务行数P2rate(doris_be_push_request_write_rows{job="clusterid",instance= "cluster_id", instance=~"be_instance"}
BE Scan BytesBE扫描任务速率P2rate(doris_be_query_scan_bytes{job="clusterid",instance= "cluster_id", instance=~"be_instance"}[$interval])
BE Scan RowsBE扫描任务行数P2rate(doris_be_query_scan_rows{job="clusterid",instance= "cluster_id", instance=~"be_instance"}[$interval])

BE tasks

监控项名称监控项含义优先级告警阈值PromQLPromQL参数
Tablets ReportBE 上各类任务执行状态的累计值P1SUM(doris_be_engine_requests_total{job="clusterid",instance= "cluster_id", instance=~"be_instance", type="report_all_tablets", status="total"})type="report_all_tablets"
Single Tablet ReportP1type="report_tablet"
Finish Task ReportP1type="finish_task"
DeleteP1type="delete"
Base CompactionP0type="base_compaction"
CloneP1type="clone"
Create RollupP1type="create_rollup"
Schema ChangeP1type="schema_change"
Create TabletP1type="create_tablet"
Push TaskBE推送任务数量P1sum(doris_be_push_requests_total{job="clusterid",instance= "cluster_id", instance=~"be_instance", status="SUCCESS"})
Push Task Cost Time每个Backend推送任务的平均花费时间。P1irate(doris_be_push_request_duration_us{job="clusterid",instance= "cluster_id", instance=~"be_instance"}[$interval]){type="write"}读取{type="write"}写入

Query监控指标

监控项名称监控项含义优先级告警阈值PromQLPromQL参数
RPS所有通过 MySQL 端口接收的操作请求(包括查询和其他语句)每秒操作率P1rate(doris_fe_request_total{job="cluster_id", group="fe"}[interval])
QPS查询请求率P1rate(doris_fe_query_total{job="cluster_id", group="fe", user!~".+"}[interval])
99th99%分位慢查询P0sum(doris_fe_query_latency_ms{job="$cluster_id", quantile="0.99"}) by (instance)
Query Percentile查询请求延迟的百分位统计。P0doris_fe_query_latency_ms{job="clusterid",instance="cluster_id", instance="fe_instance"}{type="write"}读取{type="write"}写入
Query Error[1m]错误查询P0每分钟失败的查询率>10%doris_fe_query_err{job="$cluster_id"}{type="write"}读取{type="write"}写入
Connections连接数P0doris_fe_connection_total{job="$cluster_id"}

Jobs监控指标*

监控项名称监控项含义优先级告警阈值PromQLPromQL参数
Broker Load Job当前不同作业类型的计数。如 {job="load", type="INSERT"} 表示类型为 INSERT 的导入作业个数P2doris_fe_job{job="clusterid",exportedjob="load",type="BROKER",instance="cluster_id", exported_job="load", type="BROKER", instance="fe_master"}type="INSERT"type="BROKER"type="ROUTINE"type="SPARK"
Insert Load JobP2
Routine Load JobP2
Spark Load JobP2
Broker Load Tendency当前不同作业类型以及不同作业状态的计数。如 {job="load", type="INSERT", state="LOADING"} 表示类型为 INSERT 的导入作业,处于 LOADING 状态的作业个数P2doris_fe_job{job="clusterid",exportedjob="load",type="BROKER",instance="cluster_id", exported_job="load", type="BROKER", instance="fe_master", state="PENDING"}type="INSERT"type="BROKER"type="ROUTINE"type="SPARK" state="PENDING"state="ETL" state="LOADING"
Insert Load TendencyP2
Routine Load TendencyP2
Spark Load TendencyP2
SC Jobschema change状态变更作业个数P2doris_fe_job{job="clusterid",instance="cluster_id", instance="fe_master", type="SCHEMA_CHANGE"}
Rollup JobRollup状态作业个数P2doris_fe_job{job="clusterid",instance="cluster_id", instance="fe_master", type="ROLLUP"}
Report Queue SizeBE的各种定期汇报任务在FE端的队列长度.该值反映了汇报任务在 Master FE 节点上的阻塞程度,数值越大,表示FE处理能力不足P2doris_fe_report_queue_size{job="clusterid",instance="cluster_id", instance="fe_master"}

Transactions监控指标*

监控项名称监控项含义优先级告警阈值PromQLPromQL参数
Txn Begin/Success on FE统计各个状态的导入事务的数量的累计值P2doris_fe_txn_counter{type="begin"}type="begin"type="success"type="faild"type="reject"
Txn Begin/Success on FEP2
P2
Publish Task on BEpublish状态事务总量P2sum(doris_be_engine_requests_total{job="$cluster_id", type="publish", status="total"})
Txn Status on FE事务所有状态数量统计P2doris_fe_txn_status{group="fe", job="$cluster_id", type="prepare"}
Txn Load Bytes/Rows ratestream load 最终导入的行数累计值stream load 接收的字节数累计值P2sum(rate(doris_be_stream_load{group="be", job="cluster_id", type="receive_bytes"}[interval]))