← Back to Skills Marketplace
43622283

运维智能巡检系统

by Terry S Fisher · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ⚠ suspicious
48
Downloads
0
Stars
0
Active Installs
1
Versions
Install in OpenClaw
/install li-patrol-2026
Description
支持自动检测组件的运维多层级自动巡检,涵盖资源、中间件、容器、日志及业务指标并导出JSON报告。
README (SKILL.md)

li_patrol_2026

运维智能巡检系统 - 全方位自动化巡检解决方案

简介

这是一个全面的运维智能巡检系统,支持多层级的自动化巡检,包括基础资源、中间件、容器平台、日志、业务指标等多个维度。系统会自动检测目标环境中已安装的软件和服务,仅对存在的组件进行真实巡检。

核心特性

  • 智能检测: 自动检测已安装软件,仅对存在的组件进行巡检
  • 多层巡检: 支持10层巡检体系,涵盖运维各个方面
  • 风险分级: P1/P2/P3三级风险,自动计算健康评分
  • 报告导出: 支持JSON格式报告导出
  • 灵活配置: 支持命令行参数指定巡检层级

巡检层级

实时巡检层(真实巡检)

  1. 基础资源巡检: CPU、内存、磁盘、网络、Inode、系统负载
  2. 中间件巡检: Redis、MySQL、Kafka、MongoDB、PostgreSQL、Elasticsearch、RabbitMQ、Nginx、Tomcat

混合巡检层(真实/模拟)

  1. K8S巡检: Node、Pod、Deployment、DaemonSet、Ingress、Event
  2. 日志巡检: ERROR、WARN、FATAL、异常分析

模拟巡检层

  1. 业务巡检: 订单成功率、支付成功率、接口响应时间等

扩展巡检层(规划中)

  1. 安全巡检: SSH配置、防火墙、漏洞扫描、SSL证书
  2. 配置管理巡检: 配置文件、服务配置、版本控制
  3. 性能巡检: 应用性能、系统性能、IOPS
  4. 容量规划巡检: 资源容量、业务容量、趋势分析
  5. 灾备巡检: 备份检查、恢复能力、RTO/RPO

快速开始

执行完整巡检

python3 intelligent_inspection.py

导出JSON报告

python3 intelligent_inspection.py --export

指定巡检层级

# 仅执行基础资源巡检
python3 intelligent_inspection.py --layers resource

# 执行基础资源和中间件巡检
python3 intelligent_inspection.py --layers resource middleware

# 执行所有层级巡检(默认)
python3 intelligent_inspection.py --layers all

输出示例

================================================================================
智能运维巡检报告
巡检时间: 2026-06-04 09:49:19
主机名: your-hostname
操作系统: Linux 6.8.0-117-generic
================================================================================

执行: 基础资源巡检
健康评分: 100/100
摘要: 系统资源状态良好

✓ CPU使用率
  当前值: 2.3%
  阈值: P1: >95% | P2: >85%
  状态: 正常 | 风险等级: 正常

✓ 内存使用率
  当前值: 67.4% (2.55GB/3.78GB)
  阈值: P1: >95% | P2: >85%
  状态: 正常 | 风险等级: 正常

================================================================================
巡检总结
================================================================================
总体健康评分: 98/100
P1级别问题: 0个
P2级别问题: 1个
系统状态: 优秀 ✓

风险等级说明

等级 名称 说明 分数影响
P1 严重 核心功能不可用,需要立即处理 -20分
P2 警告 功能受损或存在风险,需要尽快处理 -10分
P3 提示 存在潜在问题,建议处理 -5分

健康评分算法

  • 基础分: 100分
  • 每个P1问题: -20分
  • 每个P2问题: -10分
  • 每个P3问题: -5分
  • 最低分: 0分

评分等级:

  • 90-100分: 优秀 ✓
  • 70-89分: 良好
  • 50-69分: 需关注
  • 0-49分: 需立即处理 ✗

依赖要求

核心依赖(必需)

pip install psutil

可选依赖

pip install requests  # 用于Elasticsearch检查

支持的中间件

系统会自动检测以下中间件,仅对已安装的进行巡检:

  • Redis: 连接数、慢查询、内存碎片率、主从状态
  • MySQL/MariaDB: QPS、TPS、慢SQL、主从延迟
  • Kafka: Broker状态、ISR数量、Consumer Lag
  • MongoDB: 连接数、复制集状态、慢查询
  • PostgreSQL: 连接数、慢查询、复制延迟
  • Elasticsearch: 集群健康状态、节点数量、分片状态
  • RabbitMQ: 队列堆积、连接数、消息吞吐量
  • Nginx: 配置语法检查、进程状态
  • Tomcat: JVM堆内存、线程池状态

最佳实践

定时巡检

使用crontab配置定时巡检:

# 每15分钟执行一次基础资源巡检
*/15 * * * * /usr/bin/python3 /path/to/intelligent_inspection.py --layers resource --export

# 每小时执行一次完整巡检
0 * * * * /usr/bin/python3 /path/to/intelligent_inspection.py --export

告警集成

根据巡检结果配置告警:

  • P1级别:电话、短信告警
  • P2级别:企业微信、钉钉告警
  • P3级别:邮件、工单通知

文件说明

文件 说明
intelligent_inspection.py 主巡检脚本
README.md 详细巡检文档
README_INSPECTION.md 使用指南
skill.json Skill元数据配置

注意事项

  1. 权限要求: 部分巡检需要root权限或sudo权限
  2. 性能影响: 巡检过程会消耗一定的系统资源,建议在业务低峰期执行
  3. 网络依赖: 部分巡检需要网络连接,确保网络畅通
  4. 数据安全: 巡检报告可能包含敏感信息,注意数据脱敏和访问控制
  5. 存储空间: 历史报告会占用存储空间,定期清理

版本历史

v1.0.0 (2026-06-04)

  • 初始版本
  • 支持5层基础巡检
  • 支持自动检测已安装组件
  • 支持JSON报告导出
  • 10层完整巡检文档

许可证

MIT License

作者

@43622283

技术支持

详细文档请查看:

Usage Guidance
Install only if you treat this as a demo or partial local health-check script. Do not rely on the Kubernetes, log, or business metric sections for production decisions unless they are replaced with real data collection and clearly labeled fallback behavior; also verify report file locations and permissions before using --export or cron.
Capability Assessment
Purpose & Capability
The skill's stated purpose is system, middleware, Kubernetes, log, and business health inspection. Basic resource and some middleware checks are real, but Kubernetes, log, and business inspections generate random values that feed health scores and remediation suggestions, which is purpose-mismatched for an operations monitoring tool.
Instruction Scope
The documentation advertises selecting inspection layers with --layers, but the script parses that argument and then ignores it, so default execution always runs all configured inspectors. This reduces user control and makes it harder to avoid simulated findings.
Install Mechanism
The package declares a Python script entrypoint and a small dependency set, with no install-time execution, obfuscation, or hidden downloader behavior found.
Credentials
System reads, process/service checks, local middleware probes, and localhost Elasticsearch access are coherent for an ops inspection tool, but the simulated operational data is not clearly separated from production-grade results at runtime.
Persistence & Privilege
There is no automatic persistence or privilege escalation. The docs suggest optional sudo use, cron scheduling, and JSON export; exported reports include host and system health details and are written with normal default file permissions.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install li-patrol-2026
  3. After installation, invoke the skill by name or use /li-patrol-2026
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.0.0
初始版本:支持5层实时巡检(基础资源、中间件、K8S、日志、业务)+ 10层完整文档
Metadata
Slug li-patrol-2026
Version 1.0.0
License MIT-0
All-time Installs 0
Active Installs 0
Total Versions 1
Frequently Asked Questions

What is 运维智能巡检系统?

支持自动检测组件的运维多层级自动巡检,涵盖资源、中间件、容器、日志及业务指标并导出JSON报告。 It is an AI Agent Skill for Claude Code / OpenClaw, with 48 downloads so far.

How do I install 运维智能巡检系统?

Run "/install li-patrol-2026" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is 运维智能巡检系统 free?

Yes, 运维智能巡检系统 is completely free, licensed under MIT-0. You can download, install and use it at no cost.

Which platforms does 运维智能巡检系统 support?

运维智能巡检系统 is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created 运维智能巡检系统?

It is built and maintained by Terry S Fisher (@43622283); the current version is v1.0.0.

💬 Comments