Disk Check
SkillMonitoring & opsChecks disk usage and provides remediation suggestions, combining metrics queries and exec scripts.
Available today. Use it from your connected AI after setup.
No other account needed.
Add ahel to your AI once: Claude, ChatGPT, Cursor, Claude Code or Codex. Then ask it to use this.
Then ask your AI: use the Disk Check skill
What this skill tells your AI
The instructions your AI receives, as published by kubehan/promai in skills/disk-check/SKILL.md and read by ahel’s review.
当用户询问磁盘使用情况、磁盘告警或存储空间不足时,使用此工作流。
步骤
1. 查询磁盘指标
首先用 query_metrics 获取磁盘使用率:
(1 - (node_filesystem_avail_bytes{fstype!="",mountpoint="/"} / node_filesystem_size_bytes{fstype!="",mountpoint="/"})) * 100
如果需要查看所有挂载点,使用:
(1 - (node_filesystem_avail_bytes{fstype!=""} / node_filesystem_size_bytes{fstype!=""})) * 100
2. 执行本地探测
使用 exec 工具在目标机器上执行快速磁盘检查:
df -h --output=source,fstype,size,used,avail,pcent,target | head -20
若已知某个磁盘占用异常,进一步定位大目录:
du -sh /* 2>/dev/null | sort -rh | head -10
3. 结果分析
- 使用率 > 80%: 建议清理临时文件(
/tmp、日志),或扩展磁盘。 - 使用率 > 90%: 警告用户立即处理,推荐使用
push_report发送告警报告。 - 使用率 > 95%: 严重状态,建议立即扩容,并通过通知渠道推送紧急报告。
4. 推送报告
如果需要将结果推送给团队成员,使用 push_report:
channel: "wechat_work" (或 "dingtalk" / "feishu")
content: 包含挂载点、使用率、建议操作的格式化报告
Signals
- GitHub stars
- 124
- Forks
- 44
- Last commit
- Sep 2026
Advanced
- Item type
- skill
- Key
disk-check- Source
- github.com/kubehan/promai