← 返回 Skills 市场
laolaoqi

Docker Health Monitor

作者 new · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ⚠ suspicious
67
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install laolaoqi-docker-health
功能描述
Monitor Docker container health: running status, CPU/memory usage, restart counts, and available image updates. Use when a user requests Docker health checks...
使用说明 (SKILL.md)

Docker Health Monitor

Script

scripts/docker-health.sh — the single entry point for all checks.

The script is self-contained and works on any system with Docker installed. It auto-detects the Docker socket availability and gracefully handles permission issues.

Quick Start

Run a full health report:

bash scripts/docker-health.sh --all

Or with no arguments (same as --all):

bash scripts/docker-health.sh

Individual Checks

Run any single check by name:

Command What it checks
--status Lists all containers with their current status (running, stopped, paused, etc.)
--resources Shows CPU and memory usage per container via docker stats
--restarts Flags containers that have restarted more than 3 times
--images Checks for available image updates by comparing local image digests with registry
--full Runs all checks in sequence (same as --all)

Example:

bash scripts/docker-health.sh --status --restarts

Full Audit Workflow

  1. Run bash scripts/docker-health.sh --all
  2. The script outputs a formatted report to stdout
  3. Key sections: container status summary, resource usage table, restart warnings, image update availability

Common Findings & Recommendations

  • High restart counts (>3): Indicates container instability — check logs with docker logs \x3Ccontainer> and review healthcheck configuration
  • High memory usage: Consider setting --memory limits in the container's run/stack config; check for memory leaks in the application
  • High CPU usage: Investigate application processes; consider CPU limits or horizontal scaling
  • Outdated images: Run docker pull to update images; consider automated update workflows (watchtower, renovate-bot)
  • Exited containers: Check exit codes — 0 means intentional stop, non-zero indicates errors

Notes

  • Requires access to the Docker socket (/var/run/docker.sock) — run as root or add user to the docker group
  • --resources runs docker stats in non-streaming mode (one-shot per container) for quick snapshots
  • --images checks are advisory — uses docker inspect for image digests and checks for newer versions; requires network access to the registry
  • Works with both local Docker and remote Docker contexts (DOCKER_HOST env var)
安全使用建议
Install only if you want the agent to inspect Docker with Docker-socket-level privileges. Avoid --all or --images on production or remote Docker contexts unless you accept that the script may pull images and change the Docker image cache; use --status, --resources, or --restarts for read-only checks until the image-check behavior is clarified or fixed.
能力评估
Purpose & Capability
Status, stats, and restart reporting are aligned with Docker health monitoring, but the image freshness check mutates Docker image state by pulling images rather than only reporting.
Instruction Scope
The default --all/no-argument workflow includes the image check, so a routine health report may perform network pulls without a separate approval step.
Install Mechanism
There is no automatic installer and the shell script is readable, but registry requirements do not declare the Docker dependency or Docker access capability.
Credentials
Docker daemon access, root/docker group use, and DOCKER_HOST remote contexts are disclosed and expected for monitoring, but they are high-privilege environments.
Persistence & Privilege
docker pull can persistently update the Docker image cache/tag on the selected daemon, including remote contexts, which exceeds a purely read-only health check.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install laolaoqi-docker-health
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /laolaoqi-docker-health 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
docker-health-monitor 1.0.0 initial release: - Provides a single script (`docker-health.sh`) to monitor Docker container health. - Supports checks for running status, CPU/memory usage, restart counts, and image updates. - Offers both targeted checks (by flag) and a full health report. - Handles Docker socket detection and permission issues gracefully. - Outputs comprehensive, formatted reports to stdout.
元数据
Slug laolaoqi-docker-health
版本 1.0.0
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 1
常见问题

Docker Health Monitor 是什么?

Monitor Docker container health: running status, CPU/memory usage, restart counts, and available image updates. Use when a user requests Docker health checks... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 67 次。

如何安装 Docker Health Monitor?

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

Docker Health Monitor 是免费的吗?

是的,Docker Health Monitor 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

Docker Health Monitor 支持哪些平台?

Docker Health Monitor 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Docker Health Monitor?

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

💬 留言讨论