GaussDB (DWS) 集群管理系列:磁盘使用率告警

举报
CloudGanker 发表于 2021/11/25 16:36:26 2021/11/25
【摘要】 磁盘使用率告警

磁盘使用率告警

告警汇总

CM告警汇总链接

告警编号

磁盘剩余容量预警

  • 十进制编号:1078919264
  • 十六进制编号:0x404F0060

磁盘剩余容量不足

  • 十进制编号:1078919265
  • 十六进制编号:0x404F0061

磁盘剩余容量严重不足

  • 十进制编号:1078919266
  • 十六进制编号:0x404F0062

告警信息

磁盘剩余容量预警

  • 中文名称:磁盘剩余容量预警

  • 英文名称:DiskUsageRisk

    代码中告警英文名称为ALM_AI_DiskUsageRisk

  • 英文附加信息:Disk usage on the node %u has reached the risky threshold %d%%

  • 中文附加信息:节点%u磁盘使用率已达到风险阈值%d%%

磁盘剩余容量不足

  • 中文名称:磁盘剩余容量不足

  • 英文名称:DiskUsageReadOnly

    代码中告警英文名称为ALM_AI_DiskUsageReadOnly

  • 英文附加信息:Disk usage on the node %u has reached the read-only threshold %d%%

  • 中文附加信息:节点%u磁盘使用率已达到只读阈值%d%%

磁盘剩余容量严重不足

  • 中文名称:磁盘剩余容量严重不足

  • 英文名称:DiskUsageDanger

    代码中告警英文名称为ALM_AI_DiskUsageDanger

  • 英文附加信息:Disk usage on the node %u has reached the dangerous threshold %d%%

  • 中文附加信息:节点%u磁盘使用率已达到危险阈值%d%%

告警类型

  • ALM_AT_Fault/ALM_AT_Resume

告警等级

  • DWS
    • DiskUsageRisk: IMPORTANT
    • DiskUsageReadOnly: URGENT
    • DiskUsageDanger: URGENT

告警规则

核心规则

  • cm_agent分别当前节点上CN、DN、GTM、cm_server等实例(如果存在)的数据目录,以及CM的日志目录,分别获取所在磁盘的空间使用率和inode使用率百分比并计算最大值,然后根据最大值产生阶梯式告警。目前有三个依次递增的阈值点: T h r e s h o l d R i s k {\rm ThresholdRisk} T h r e s h o l d R e a d O n l y {\rm ThresholdReadOnly} T h r e s h o l d D a n g e r {\rm ThresholdDanger}
  • 当最大使用率处于如下区间时:
    • [ T h r e s h o l d D a n g e r , ) [{\rm ThresholdDanger}, \infin) : 上报DiskUsageDanger告警(实际上磁盘使用率不可能超过100%)
    • [ T h r e s h o l d R e a d O n l y , T h r e s h o l d D a n g e r ) [{\rm ThresholdReadOnly}, {\rm ThresholdDanger}) : 上报DiskUsageReadOnly告警,并消除DiskUsageDanger告警
    • [ T h r e s h o l d R i s k , T h r e s h o l d R e a d O n l y ) [{\rm ThresholdRisk}, {\rm ThresholdReadOnly}) : 上报DiskUsageRisk告警,并消除DiskUsageReadOnlyDiskUsageDanger告警
    • [ 0 , T h r e s h o l d R i s k ) [0, {\rm ThresholdRisk}) : 消除DiskUsageRisk, DiskUsageReadOnlyDiskUsageDanger告警
  • 内核应避免最大使用率达到 T h r e s h o l d D a n g e r {\rm ThresholdDanger}

默认情况下,告警类型表格如下:

最大磁盘使用率(百分比) DiskUsageRisk DiskUsageReadOnly DiskUsageDanger
[95, 100] ALM_AT_Fault 维持不变 维持不变
[90, 95) ALM_AT_Resume ALM_AT_Fault 维持不变
[80, 90) ALM_AT_Resume ALM_AT_Resume ALM_AT_Fault
[0, 80) ALM_AT_Resume ALM_AT_Resume ALM_AT_Resume

告警阈值的计算

  • T h r e s h o l d R e a d O n l y {\rm ThresholdReadOnly} 等于CM配置参数datastorage_threshold_value_check的取值,默认值90
  • T h r e s h o l d R e a d R i s k = T h r e s h o l d R e a d O n l y × 2 100 {\rm ThresholdReadRisk} = {\rm ThresholdReadOnly} \times 2 - 100 , 默认值80
  • T h r e s h o l d R e a d D a n g e r = ( T h r e s h o l d R e a d O n l y + 100 ) / 2 {\rm ThresholdReadDanger} = ({\rm ThresholdReadOnly} + 100) / 2 , 默认值95

相关告警

  • 当最大使用率达到 T h r e s h o l d D a n g e r {\rm ThresholdDanger} 时,节点内的备DN和从备DN将被停止,此时会伴随产生DN实例状态异常、DN进程异常等告警。
    • 1078919172 AbnormalDatanodeInst
    • 1078919184 AbnormalDatanodeProcess

版本分析

  • 内核版本
id name C80 651 8.0 8.1
1078919264 DiskUsageRisk ✔️
1078919265 DiskUsageReadOnly ✔️ ✔️ ✔️ ✔️
1078919266 DiskUsageDanger ✔️
  • FIM支持情况待补充。
  • DWS已支持。

测试验证

控制磁盘最大使用率逐渐上升并分别达到三个阈值,然后再控制逐渐下降,cm_agent日志如下:

# 最大使用率 50%
Storage detecting is working.
# 最大使用率 85%
Alarm LOG: Reporting alarm id 1078919264 with type 0 and info "Disk usage on the node 1 has reached the risky threshold 85%".
# 最大使用率 92%
Alarm LOG: Reporting alarm id 1078919264 with type 0 and info "Disk usage on the node 1 has reached the risky threshold 85%".
Alarm LOG: Reporting alarm id 1078919265 with type 0 and info "Disk usage on the node 1 has reached the read-only threshold 92%".
# 最大使用率 96%
Alarm LOG: Reporting alarm id 1078919264 with type 0 and info "Disk usage on the node 1 has reached the risky threshold 85%".
Alarm LOG: Reporting alarm id 1078919265 with type 0 and info "Disk usage on the node 1 has reached the read-only threshold 92%".
Alarm LOG: Reporting alarm id 1078919266 with type 0 and info "Disk usage on the node 1 has reached the dangerous threshold 96%".
# 最大使用率 92%
Alarm LOG: Reporting alarm id 1078919264 with type 0 and info "Disk usage on the node 1 has reached the risky threshold 85%".
Alarm LOG: Reporting alarm id 1078919265 with type 0 and info "Disk usage on the node 1 has reached the read-only threshold 92%".
# 最大使用率 85%
Alarm LOG: Reporting alarm id 1078919264 with type 0 and info "Disk usage on the node 1 has reached the risky threshold 85%".
# 最大使用率 50%
Storage detecting is working.

告警信息如下:

alarm 1078919264 0 0009000000000009001200000094mpp1p1s1d127.0.0.1ecs-env-3108Disk#usage#on#the#node#1#has#reached#the#risky#threshold#85%#节点1磁盘使用率已达到风险阈值85%
alarm 1078919265 0 0009000000000009001200000098mpp1p1s1d127.0.0.1ecs-env-3108Disk#usage#on#the#node#1#has#reached#the#read-only#threshold#92%#节点1磁盘使用率已达到只读阈值92%
alarm 1078919266 0 0009000000000009001200000098mpp1p1s1d127.0.0.1ecs-env-3108Disk#usage#on#the#node#1#has#reached#the#dangerous#threshold#96%#节点1磁盘使用率已达到危险阈值96%

GaussDB(DWS)博文后缀.png

【版权声明】本文为华为云社区用户原创内容,转载时必须标注文章的来源(华为云社区)、文章链接、文章作者等基本信息, 否则作者和本社区有权追究责任。如果您发现本社区中有涉嫌抄袭的内容,欢迎发送邮件进行举报,并提供相关证据,一经查实,本社区将立刻删除涉嫌侵权内容,举报邮箱: cloudbbs@huaweicloud.com
  • 点赞
  • 收藏
  • 关注作者

评论(0

0/1000
抱歉,系统识别当前为高风险访问,暂不支持该操作

全部回复

上滑加载中

设置昵称

在此一键设置昵称,即可参与社区互动!

*长度不超过10个汉字或20个英文字符,设置后3个月内不可修改。

*长度不超过10个汉字或20个英文字符,设置后3个月内不可修改。

举报
请填写举报理由
0/200