GBase 8a
运维管理
文章
zabbix监控GBase 8a 的指标项
发表于2025-03-15 15:00:5750次浏览1个评论
| 1 | 集群运行状态 | gcadmin|grep "CLUSTER STATE" |
| 2 | 集群模式 | gcadmin showcluster vc vc1|grep "VIRTUAL CLUSTER MODE" |
| 3 | 集群类型 | gcadmin show_gcware_mode |
| 4 | GCluster服务状态 | gcadmin | grep coordinator | grep -vE "COORDINATOR CLUSTER|coordinator node"|awk -F '|' '{print $4}' |
| 5 | GCluster数据一致性状态 | gcadmin | grep -i coordinator | grep -vE "COORDINATOR CLUSTER|coordinator node"|awk -F '|' '{print $5}' |
| 6 | GCware服务状态 | gcadmin | grep gcware |grep -vE "NodeName" |awk -F '|' '{print $4}' |
| 7 | GNode服务状态 | gcadmin showcluster vc vc1|grep node |grep -vE "NodeName"|awk -F '|' '{print $5}' |
| 8 | GNode数据一致性状态 | gcadmin showcluster vc vc1|grep node |grep -vE "NodeName"|awk -F '|' '{print $7}' |
| 9 | Syncserver服务状态 | gcadmin showcluster vc vc1|grep node |grep -vE "NodeName"|awk -F '|' '{print $6}' |
| 10 | DDLevent数量 | gcadmin showddlevent f 然后需要抓取数量 |
| 11 | DMLevent数量 | gcadmin showdmlevent 同上 |
| 12 | DMLStorageevent数量 | gcadmin showdmlstorageevent 同上 |
| 13 | failover数量 | gcadmin showfailover f 然后需要抓取数量 |
| 14 | 被takeover的failover数量 | gcadmin showfailover f 然后需要抓取takeover_number的值>0的数量 |
| 15 | 集群锁总数 | gcadmin showlock f 然后需要抓取数量 |
| 16 | 集群日志等级 | gbase> show variables like 'gcluster_log_level'; |
| 17 | 集群详细版本 | gbase> show variables like '%version'; |
| 18 | 会话连接数 | select count(*) from information_schema.COORDINATORS_TASK_INFORMATION where command not in ('Daemon','CTQ','GNS'); |
| 19 | 活跃会话数 | select count(*) from information_schema.coordinators_task_information where command in ('Query'); |
| 20 | 平均SQL执行时间 | select t1.totalTime,t2.totalNum from (select sum(time) as totalTime from information_schema.COORDINATORS_TASK_INFORMATION where command not in ('Daemon','CTQ','GNS') and info like 'select%') as t1,(select count(*) as totalNum from information_schema.COORDINATORS_TASK_INFORMATION where command not in ('Daemon','CTQ','GNS') and info like 'select%') as t2; |
| 21 | ddl 数量 | select sql_type,count(*) as nums from gbase.audit_log group by sql_type; |
| 22 | dml 数量 | select sql_type,count(*) as nums from gbase.audit_log group by sql_type; |
| 23 | dql 数量 | select sql_type,count(*) as nums from gbase.audit_log group by sql_type; |
| 24 | 处于checking permission状态的SQL数量 | select count(*) from information_schema.processlist where command='checking permissions'; |
| 25 | 处于killed状态的SQL数量 | select count(*) from information_schema.processlist where command='killed'; |
| 26 | SQL临时空间使用量 | select sum(temp_space) from performance_schema.SESSION_MEMORY_USAGE_INFO; |
| 27 | data堆内存使用率 | select USED_IN_HEAP/HEAP_SIZE from performance_schema.HEAP_USAGE_INFO where heap_type='dc_heap'; |
| 28 | large堆内存使用率 | select USED_IN_HEAP/HEAP_SIZE from performance_schema.HEAP_USAGE_INFO where heap_type='large_heap'; |
| 29 | temp堆内存使用率 | select USED_IN_HEAP/HEAP_SIZE from performance_schema.HEAP_USAGE_INFO where heap_type='temp_heap'; |
| 30 | 元数据内存占用大小 | show status like 'express_cached_metadata'; |
| 31 | gnode 节点 query 类型的 process 数量 | select count(*) from information_schema.processlist where command='query' and time>0; |
| 32 | 集群 query 类型 sql 执行时长异常数量 | select count(*) from information_schema.COORDINATORS_TASK_INFORMATION where time >[设置阈值]; |
| 33 | kafka运行状态监控 | gc节点执行select count(*) from information_schema.kafka_consumer_status where length(exception) >1; |
热门帖子
- 12025-12-01浏览数:182759
- 22023-05-09浏览数:25044
- 42023-09-25浏览数:18519
- 52020-05-11浏览数:17526