← 返回 Skills 市场
magicczc

数据库健康监控

作者 magicCzc · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ⚠ suspicious
38
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install dbskiter-db-monitor
功能描述
数据库健康监控,支持健康检查、异常检测、容量预测、高级容量预测、趋势分析、基线对比。 智能数据源选择: - Oracle 数据库自动使用 Zabbix 监控 - MySQL 数据库优先使用直连,其次使用 Prometheus - 支持 Z 系列资产组(如 Z18, Z5)自动识别 使用场景: - 用户说"检查健康...
使用说明 (SKILL.md)

数据库监控 Skill

智能数据源选择

系统会根据 --database 参数自动选择最优数据源:

数据库类型 识别规则 数据源优先级
Oracle Z 系列资产组(Z18, Z5等)或 KF 系列 Zabbix
MySQL 其他名称 直连数据库 > Prometheus

示例示例:

# Oracle 数据库(自动使用 Zabbix)
dbskiter --output-mode=ai --database=Z18 monitor health
dbskiter --output-mode=ai --database=Z5 monitor capacity --resource=disk

# MySQL 数据库(优先直连,其次 Prometheus)
dbskiter --output-mode=ai --database=jump monitor health
dbskiter --output-mode=ai --database=prod monitor anomalies

何时使用

当用户提到以下关键词时,使用此skill:

用户说法 执行命令 说明
"检查健康" dbskiter --output-mode=ai --database=\x3Cname> monitor health 整体健康评分
"有异常吗" dbskiter --output-mode=ai --database=\x3Cname> monitor anomalies 检测异常指标
"容量够吗" dbskiter --output-mode=ai --database=\x3Cname> monitor capacity 容量预测
"采集数据" dbskiter --output-mode=ai --database=\x3Cname> monitor collect 采集当前指标
"看历史" dbskiter --output-mode=ai --database=\x3Cname> monitor history \x3C指标> 查看指标历史
"高级容量预测" dbskiter --output-mode=ai --database=\x3Cname> monitor capacity-advanced 多算法容量预测
"趋势分析" dbskiter --output-mode=ai --database=\x3Cname> monitor trend 指标趋势分析
"基线对比" dbskiter --output-mode=ai --database=\x3Cname> monitor compare 与历史基线对比

核心命令(8个)

高级功能(新增)

6. 高级容量预测

dbskiter --output-mode=ai --database=\x3C数据库名> monitor capacity-advanced --resource=disk

特点

  • 自动选择最佳预测算法(线性回归、移动平均、指数平滑、多项式拟合)
  • 提供置信度评估
  • 更精确的预测结果

输出

{
  "algorithm": "linear_regression",
  "confidence": 0.85,
  "predictions": {
    "7d": 68.5,
    "30d": 75.2,
    "90d": 88.5
  },
  "days_to_threshold": 45,
  "recommendation": "建议在45天内扩容"
}

7. 趋势分析

dbskiter --output-mode=ai --database=\x3C数据库名> monitor trend --metric=cpu_usage --days=7

适用场景

  • 分析指标变化趋势
  • 对比当前值与历史平均值
  • 判断性能是改善还是恶化

输出

{
  "trend_direction": "degrading",
  "current_value": 75.5,
  "historical_avg": 65.2,
  "change_percent": 15.8,
  "recommendation": "CPU使用率呈恶化趋势,建议关注"
}

8. 基线对比

dbskiter --output-mode=ai --database=\x3C数据库名> monitor compare --metric=qps --value=1250 --baseline=2026-04-01

适用场景

  • 对比当前性能与历史基线
  • 评估优化效果
  • 检测性能退化

输出

{
  "current_value": 1250,
  "baseline_value": 1000,
  "change_percent": 25.0,
  "severity": "normal",
  "message": "QPS较基线上升25.0%,在正常范围内"
}

9. 性能退化检测

dbskiter --output-mode=ai --database=\x3C数据库名> monitor degradation

适用场景

  • 自动检测所有性能退化指标
  • 与db-diagnose性能快照集成

输出

{
  "degradation_count": 2,
  "degradations": [
    {
      "metric_type": "cpu_usage",
      "change_percent": 30.5,
      "severity": "warning"
    }
  ]
}

1. 健康检查

dbskiter --database=\x3C数据库名> monitor health

输出:总体评分、各组件状态、关键指标

评分标准

  • 90-100:优秀 [OK]
  • 70-89:良好 [WARN]
  • \x3C70:需要关注 [CRITICAL]

2. 异常检测

dbskiter --database=\x3C数据库名> monitor anomalies

默认行为:检测所有指标的异常

输出:异常列表、严重程度、建议

3. 容量预测

dbskiter --database=\x3C数据库名> monitor capacity --resource=disk

可选资源

  • disk:磁盘空间
  • memory:内存使用
  • connections:连接数

输出:当前使用率、预测值、剩余天数、风险等级

4. 采集指标

dbskiter --database=\x3C数据库名> monitor collect

默认行为:采集所有核心指标

可选参数

  • --metrics=qps,connections:只采集指定指标

5. 查看历史

dbskiter --database=\x3C数据库名> monitor history connections_active --hours=24

输出:历史指标数据、趋势图表

AI决策流程

场景1:用户说"检查数据库健康"

步骤1:执行 dbskiter --database=\x3Cname> monitor health
步骤2:解读健康评分和状态
步骤3:如果有问题,执行 dbskiter --database=\x3Cname> monitor anomalies
步骤4:总结给用户

场景2:用户说"磁盘还够用吗"

步骤1:执行 dbskiter --database=\x3Cname> monitor capacity --resource=disk
步骤2:解读当前使用率和预测
步骤3:如果接近阈值,给出扩容建议

场景3:用户说"看看有没有异常"

步骤1:执行 dbskiter --database=\x3Cname> monitor anomalies
步骤2:列出发现的异常
步骤3:对严重异常,建议进一步诊断
安全使用建议
Do not install or enable this skill until the publisher clarifies where the 'dbskiter' binary comes from, how it will be installed, and exactly what credentials or API tokens it requires. Questions to ask the author: 1) Provide the install URL or package (official release or package name) for 'dbskiter' and a checksum/signature. 2) List all required environment variables, config files, or credentials (DB user/passwords, Prometheus/Zabbix API tokens) and explain how the agent will obtain them. 3) Explain network endpoints the tool contacts and whether any data is sent to external servers not under your control. If you must proceed, run the skill only in a sandboxed or monitored environment and provide the least-privileged credentials possible. If the author supplies an install spec and explicit credential requirements that align with the described purpose (and the install source is a trusted project/release), that would reduce the concern.
能力评估
Purpose & Capability
The SKILL.md clearly intends to invoke a local CLI tool named 'dbskiter' and to access data sources (direct DB connections, Prometheus, Zabbix). However the skill metadata lists no required binaries, no install spec, and no homepage/source. Requiring access to Oracle/Zabbix/Prometheus/direct DBs is coherent with a DB monitoring purpose, but the skill does not declare or request the credentials, binaries, or network access that would actually be needed.
Instruction Scope
Instructions instruct the agent to run many 'dbskiter' CLI commands (health, anomalies, collect, history, capacity-advanced, trend, compare). They implicitly require network/database credentials and reachable monitoring endpoints. The SKILL.md does not instruct how to obtain or supply those credentials, nor does it limit where data is sent. The instructions assume existing system-level tooling and access without declaring or constraining them.
Install Mechanism
There is no install spec (instruction-only). That reduces surface risk from arbitrary code downloads, but it increases dependency-on-host risk: the CLI 'dbskiter' must already exist on the host. The skill fails to declare that dependency in the registry metadata (required binaries list is empty), which is an inconsistency.
Credentials
The skill declares no required environment variables or credentials, yet its functionality requires access to databases and monitoring systems (which normally need DB credentials, API tokens for Prometheus/Zabbix, or at least agent access). This omission is disproportionate: either the skill expects existing system-level credentials (not disclosed) or the metadata is incomplete — both are concerning from a security/least-privilege perspective.
Persistence & Privilege
The skill is not always-enabled, does not request special persistent privileges, and has no install-time actions declared. Autonomous invocation is permitted (platform default) but there are no additional privilege flags set. There is no evidence it modifies other skills or agent-wide settings.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install dbskiter-db-monitor
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /dbskiter-db-monitor 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
db-monitor 1.0.0 released. - Initial release of database health monitoring skill. - Supports health checks, anomaly detection, capacity prediction (including advanced methods), trend analysis, and baseline comparison. - Intelligent datasource selection: auto-selects Zabbix for Oracle, direct/Prometheus for MySQL, with Z-series group detection. - Provides clear user scenarios and command examples for 8+ common monitoring needs. - Detailed feature documentation for advanced forecasting, trends, baseline diff, and degradation detection.
元数据
Slug dbskiter-db-monitor
版本 1.0.0
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 1
常见问题

数据库健康监控 是什么?

数据库健康监控,支持健康检查、异常检测、容量预测、高级容量预测、趋势分析、基线对比。 智能数据源选择: - Oracle 数据库自动使用 Zabbix 监控 - MySQL 数据库优先使用直连,其次使用 Prometheus - 支持 Z 系列资产组(如 Z18, Z5)自动识别 使用场景: - 用户说"检查健康... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 38 次。

如何安装 数据库健康监控?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install dbskiter-db-monitor」即可一键安装,无需额外配置。

数据库健康监控 是免费的吗?

是的,数据库健康监控 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

数据库健康监控 支持哪些平台?

数据库健康监控 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 数据库健康监控?

由 magicCzc(@magicczc)开发并维护,当前版本 v1.0.0。

💬 留言讨论