Token导航 LogoToken导航

Agent Skill · 运维和基础设施

monitoring-database-health(监控数据库健康状况)

用于辅助数据库表结构、查询语句、迁移脚本和数据维护任务。它适合让 Agent 分析 schema、编写 SQL、排查查询问题、整理索引或生成迁移建议。使用时需要明确数据库类型、连接环境和目标表,区分只读分析与写入变更;涉及删除、更新、迁移和批量导入时,应优先 dry-run、备份或事务保护,避免误操作。

monitoring-database-health 是运维和基础设施类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为接触敏感数据;许可证为 MIT,第三方扫描有提醒项,按安装量在运维和基础设施类的 2,449 个 Skill 里排第 1,321。

总安装 661周安装 27GitHub Stars 2,067下载 214核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
MIT

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:monitoring-database-health(监控数据库健康状况)
来源仓库:https://github.com/jeremylongshore/claude-code-plugins-plus-skills
仓库路径:skills/monitoring-database-health
安装命令:
npx skills add https://github.com/jeremylongshore/claude-code-plugins-plus-skills --skill monitoring-database-health
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。不同来源提供的安装方式可能略有差异;本站展示可直接复制的安装命令,安装前请核对来源页面。

skills.shnpx skills
npx skills add https://github.com/jeremylongshore/claude-code-plugins-plus-skills --skill monitoring-database-health

这个 Skill 是做什么的

运维和基础设施类 Skill 处理部署、监控、日志和云资源,多数需要较高的执行权限。

monitoring-database-health 用于辅助数据库表结构、查询语句和迁移脚本分析。适合让 Agent 分析 schema、编写 SQL、排查查询问题或生成迁移建议。通过 npx skills add 命令从指定 GitHub 仓库安装并使用。

使用时需明确数据库类型和环境,涉及写入操作时应优先 dry-run 或事务保护。适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。

来源仓库内路径:skills/monitoring-database-health

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/jeremylongshore/claude-code-plugins-plus-skill…;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要接触敏感数据,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

monitoring-database-health 怎么安装?

在终端执行 npx skills add https://github.com/jeremylongshore/claude-code-plugins-plus-skills --skill…。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

monitoring-database-health 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

monitoring-database-health 需要什么权限?

权限级别是接触敏感数据。该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

monitoring-database-health 是免费的吗?

来源标注的许可证是 MIT。本站不代收任何费用,也不托管安装包;能否商用、要不要署名,以许可证原文为准。

monitoring-database-health 用的人多吗?

公开数据是累计安装 661 次,近一周安装 27 次,下载 214 次,GitHub 2,067 星。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

monitoring-database-health 安全吗?

第三方扫描有提醒项,说明存在需要人工确认的行为。安装前请打开源码看清它读了什么、联网到哪里。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。
  • 3 个目录同时收录,说明这个 Skill 流传比较广。
  • 许可证明确为 MIT,商用和分发边界好判断。
  • 来源仓库有 2,067 星,维护活跃度相对可查。

先想清楚的地方

  • 需要接触敏感数据,装到常用环境前要先评估影响面。
  • 第三方扫描存在提醒项或未通过项,需要人工逐条确认。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理运维和基础设施类任务、又不想每次都手写提示词的人。

不太适合

  • 环境里有大量密钥、凭证,不方便给第三方 Skill 读取的人。
  • 需要厂商级技术支持和 SLA 的生产系统。

运维和基础设施类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
brainstorming

头脑风暴 · Codex、Claude

3,148,776173,131操作浏览器MIT通过
copywriting

文案写作 · Codex、Claude

1,996,72425,583需要联网MIT通过
openclaw-secure-linux-cloud

OpenClaw secure linux cloud 命令行 · Codex、Claude

1,853,08840接触敏感数据未明确未通过
xget

xget 命令行 · Codex、Claude

1,799,28040执行命令未明确未通过
requesting-code-review

代码审查请求 · Codex、Claude

1,590,144173,103权限未标注MIT通过
monitoring-database-health

监控数据库健康状况 · 本页

6612,067接触敏感数据MIT有提醒

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

Database Health Monitor

Overview

Monitor database server health across PostgreSQL, MySQL, and MongoDB by tracking key performance indicators including connection utilization, query throughput, replication lag, disk usage, cache hit ratios, vacuum activity, and lock contention.

Prerequisites

  • Database credentials with access to system statistics views (pg_stat_*, performance_schema, serverStatus)
  • psql, mysql, or mongosh CLI tools for running health check queries
  • Permissions: pg_monitor role (PostgreSQL), PROCESS privilege (MySQL)
  • Baseline metrics from a period of normal operation for threshold calibration
  • Alerting channel configured (email, Slack webhook, PagerDuty)

Instructions

  1. Check connection utilization:

- PostgreSQL: SELECT count(*) AS active_connections, (SELECT setting::int FROM pg_settings WHERE name = 'max_connections') AS max_connections, round(count(*)::numeric / (SELECT setting::int FROM pg_settings WHERE name = 'max_connections') * 100, 1) AS utilization_pct FROM pg_stat_activity - MySQL: SELECT VARIABLE_VALUE AS connections FROM performance_schema.global_status WHERE VARIABLE_NAME = 'Threads_connected' - Alert threshold: utilization above 80%

  1. Monitor query throughput and error rate:

- PostgreSQL: SELECT datname, xact_commit AS commits_total, xact_rollback AS rollbacks_total, xact_rollback::float / GREATEST(xact_commit, 1) AS rollback_ratio FROM pg_stat_database WHERE datname = current_database() - MySQL: SHOW GLOBAL STATUS LIKE 'Com_commit' and SHOW GLOBAL STATUS LIKE 'Com_rollback' - Alert threshold: rollback ratio above 5% or throughput drops more than 50% from baseline

  1. Check disk usage and growth:

- PostgreSQL: SELECT pg_size_pretty(pg_database_size(current_database())) AS db_size and SELECT tablename, pg_size_pretty(pg_total_relation_size(tablename::text)) AS size FROM pg_tables WHERE schemaname = 'public' ORDER BY pg_total_relation_size(tablename::text) DESC LIMIT 10 - Alert threshold: disk usage above 80% or growth rate projecting full disk within 7 days

  1. Monitor cache hit ratio:

- PostgreSQL: SELECT sum(heap_blks_hit)::float / GREATEST(sum(heap_blks_hit) + sum(heap_blks_read), 1) AS cache_hit_ratio FROM pg_statio_user_tables - MySQL: SELECT (1 - (VARIABLE_VALUE / (SELECT VARIABLE_VALUE FROM performance_schema.global_status WHERE VARIABLE_NAME = 'Innodb_buffer_pool_read_requests'))) AS hit_ratio FROM performance_schema.global_status WHERE VARIABLE_NAME = 'Innodb_buffer_pool_reads' - Alert threshold: cache hit ratio below 95% indicates shared_buffers or innodb_buffer_pool_size needs increasing

  1. Check vacuum and autovacuum health (PostgreSQL):

- SELECT relname, last_vacuum, last_autovacuum, n_dead_tup, n_live_tup, round(n_dead_tup::numeric / GREATEST(n_live_tup, 1) * 100, 1) AS dead_pct FROM pg_stat_user_tables WHERE n_dead_tup > 1000 ORDER BY n_dead_tup DESC LIMIT 10 - Alert threshold: dead tuple percentage above 20% or autovacuum not running for more than 24 hours on active tables

  1. Monitor replication lag (if replicas exist):

- PostgreSQL: SELECT client_addr, state, pg_wal_lsn_diff(sent_lsn, replay_lsn) AS lag_bytes FROM pg_stat_replication - MySQL: SHOW REPLICA STATUS\G - check Seconds_Behind_Source - Alert threshold: lag above 30 seconds or replication stopped

  1. Check for long-running queries:

- PostgreSQL: SELECT pid, now() - query_start AS duration, state, query FROM pg_stat_activity WHERE state!= 'idle' AND now() - query_start > interval '5 minutes' ORDER BY duration DESC - Alert threshold: any query running longer than 10 minutes (OLTP) or 1 hour (analytics)

  1. Monitor lock contention:

- PostgreSQL: SELECT count(*) AS waiting_queries FROM pg_stat_activity WHERE wait_event_type = 'Lock' - Alert threshold: more than 10 queries waiting for locks simultaneously

  1. Compile all health checks into a single monitoring script that runs via cron every 60 seconds, outputs metrics in a structured format (JSON), and triggers alerts when thresholds are breached.
  2. Create a health summary dashboard query that returns a single-row result with RAG (Red/Amber/Green) status for each health dimension: connections, throughput, disk, cache, vacuum, replication, queries, and locks.

Output

  • Health check queries tailored to the specific database engine
  • Monitoring script (shell or Python) for scheduled health checks with alerting
  • Threshold configuration with default values and tuning guidance
  • Dashboard summary query providing RAG status across all health dimensions
  • Alert notification templates for Slack, email, or PagerDuty integration

Error Handling

ErrorCauseSolution
pg_stat_activity returns incomplete datatrack_activities = off in postgresql.confEnable track_activities = on and track_counts = on; reload configuration
Health check query itself times outDatabase under heavy load or lock contentionSet statement_timeout = '5s' for monitoring queries; use a dedicated monitoring connection
False alerts during maintenance windowsPlanned maintenance triggers threshold breachesImplement alert suppression windows; add maintenance mode flag to monitoring script
Disk usage alert but no obvious growthWAL files, temporary files, or pg_stat_tmp consuming spaceCheck pg_wal directory size; check for orphaned temporary files; verify wal_keep_size setting
Cache hit ratio drops after restartBuffer pool/shared_buffers cold after database restartImplement cache warming script that runs key queries after restart; alert will self-resolve as cache warms

Examples

PostgreSQL health dashboard for a production SaaS application: A single cron-based script checks 8 health dimensions every 60 seconds, writing results to a metrics table. A dashboard query shows: connections 45/200 (GREEN), cache hit 98.5% (GREEN), dead tuples 2.1% (GREEN), disk 62% (GREEN), replication lag 0.5s (GREEN), long queries 0 (GREEN), lock waiters 1 (GREEN), rollback ratio 0.3% (GREEN).

Detecting impending disk full condition: Health monitor tracks daily disk growth rate. Current usage: 72%, daily growth: 1.2GB, remaining: 280GB. Projected full date: 233 days. Alert triggers at 80% with recommendation to archive old data or add storage. A second alert at 90% escalates to PagerDuty.

Identifying autovacuum falling behind: Health check shows the events table with 15M dead tuples (45% dead ratio) and last autovacuum 3 days ago. Root cause: autovacuum_vacuum_cost_delay too conservative for a high-write table. Fix: set per-table autovacuum_vacuum_cost_delay = 2 and autovacuum_vacuum_scale_factor = 0.01.

Resources

平台分布

github-copilot

26.56%
按下载量换算57

OpenCode

23.76%
按下载量换算51

Cursor

17.44%
按下载量换算37

Claude Code

13.97%
按下载量换算30

Antigravity

8.32%
按下载量换算18

Gemini CLI

3.23%
按下载量换算7

安全审计

Gen Agent Trust Hub

可疑

Socket

通过

Snyk

可疑

权限和风险

接触敏感数据

该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在提醒或未通过项,安装前请自行复核。

继续浏览同类 Skills