Integrations
Sends detailed system monitoring reports to Discord channels through configurable webhooks, with separate reports for hardware metrics and network analysis, formatted as visually optimized embeds
Uses pandas for data manipulation of collected system metrics before analysis and reporting
Built on Python 3.8+ with a CLI interface for running system monitoring, anomaly detection, and reporting commands
MCP_AI_监控器
🔍 概述
MCP_AI_Monitor 是一个全面的系统监控解决方案,它使用无监督机器学习算法来检测资源使用中的异常行为。它旨在实时深入了解您的系统性能,结合了数据收集、预测分析和详细报告。
✨ 主要特点
- 🤖 AI 异常检测- 使用孤立森林识别异常的系统行为
- 📊 实时分析- 持续监控 CPU、RAM 和网络指标
- 🧠 自适应学习- 适应系统的正常行为以减少误报
- 📱 即时通知- 检测到异常时系统发出警报
- 📈 详细可视化- 具有趋势识别的资源使用情况图表
- ⚙️ 流程分析- 识别资源密集型应用程序
- 🌐 网络监控- 分析活动连接和网络性能
- 📡 Discord 集成- 详细报告自动发送到您的 Discord 频道
- 🎨 现代 CLI 界面- 终端中色彩丰富且直观的显示
🚀 可订购
命令 | 描述 |
---|---|
python mcp.py collect | 系统数据收集(CPU、RAM) |
python mcp.py train | 训练用于异常检测的 AI 模型 |
python mcp.py monitor | 启动具有异常检测的实时监控 |
python mcp.py stats | 生成使用情况图表和统计数据 |
python mcp.py discord | 在 Discord 上发送详细报告 |
python mcp.py network | 分析网络并发送专门报告 |
python mcp.py all | 执行完整序列(收集、训练、监控) |
🛠️ 建筑
MCP_AI_Monitor 由几个附加组件组成:
- 数据收集模块(
collect_data.py
)- 定期记录系统指标
- 以 CSV 格式存储数据以供日后分析
- AI训练模块(
train_model.py
)- 预处理收集的数据
- 训练孤立森林模型进行异常检测
- 保存模型以供实时使用
- 监控模块(
monitor_ai.py
)- 使用训练好的模型实时检测异常
- 实施学习阶段以适应正常行为
- 区分应用程序启动与真实异常
- Discord 集成
- 发送硬件和网络的单独报告
- 为每个数据类别使用可配置的 webhook
- 通过主题嵌入优化视觉格式
📊 Discord 报告
MCP_AI_Monitor 生成详细报告并通过专用 webhook 将其发送到 Discord:
硬件报告
- 系统信息- 有关 CPU、RAM、OS 的详细信息
- 使用情况图表- 可视化 CPU/RAM 趋势
- 活动进程- 最耗电的应用程序列表
网络报告
- 网络活动- 上传/下载速度、数据量
- 网络接口- 活动接口及其 IP 地址的详细信息
- 活动连接- 跟踪已建立的连接和相关进程
📋 先决条件
- Python 3.8+
- Python 依赖项(可通过
pip install -r requirements.txt
安装):- psutil - 系统数据收集
- scikit-learn——机器学习算法
- pandas - 数据操作
- matplotlib - 图形生成
- colorama - 终端中的彩色显示
- discord-webhook - 与 Discord 集成
🔧 安装
- 克隆此存储库:
Copy
- 安装依赖项:
Copy
- 配置您的 Discord webhook(可选):
- 更改
mcp.py
文件中的 webhook URL - 能够使用单独的 webhook 来报告硬件和网络
- 更改
📖 用户指南
快速入门
首次完整使用:
Copy
自动化工作流程
要通过一个命令运行整个过程:
Copy
🔍 异常检测
系统采用孤立森林算法检测异常行为:
- 学习阶段——收集数据以建立基线
- 动态适应——根据正常行为调整阈值
- 智能过滤——检测应用程序启动以减少误报
- 异常评分- 根据异常级别对事件进行分类
🌱 贡献
欢迎投稿!贡献:
- 分叉项目
- 为你的功能创建一个分支(
git checkout -b feature/amazing-feature
) - 提交您的更改(
git commit -m 'Add some amazing feature'
) - 推送到分支(
git push origin feature/amazing-feature
) - 打开拉取请求
📜 许可证
该项目已获得 MIT 许可。请参阅LICENSE
文件以了解更多信息。
👥 作者
- MedusaSH -初始开发- Github
🙏 致谢
- 通过 scikit-learn 实现森林隔热
- psutil 用于访问系统指标
- 用于 Discord 集成的 discord-webhook 库
Related MCP Servers
- -securityAlicense-qualityA server for task orchestration and coordination, facilitating task management with dependencies, multi-instance collaboration, and persistent task tracking.Last updated -717JavaScriptMIT License
- AsecurityAlicenseAqualityAn unofficial server that allows AI assistants to access Fathom Analytics data, enabling users to retrieve account information, site statistics, events, aggregated reports, and real-time visitor tracking.Last updated -581TypeScriptMIT License
- -securityAlicense-qualityThis server enables large language models to access and interact with real-time transport alerts from Transport for NSW's network, supporting filtering by transport mode and returning formatted alert information about disruptions and planned works.Last updated -115JavaScriptMIT License
- -securityAlicense-qualityA JVM monitoring and control platform server based on Arthas that provides a Python interface for monitoring and analyzing Java processes with capabilities for thread analysis, memory monitoring, and performance diagnostics.Last updated -31PythonMIT License