360 Secure SkillHub
360 安全技能中心

Monitoring Skill

该 Skill 通过脚本采集 CPU 与内存占用最高的进程,把指标写入本地 SQLite 数据库,再用随机森林回归模型预测未来 24 小时 CPU 使用情况并生成 Amber/Red 告警,还可导出最新指标的 Excel 报表。提供 /collect-metrics、/predict-usage、/generate-report 三个命令。

分类:数据
ningtoba
ningtoba
热度 43.05
最近更新 2026-05-11 17:29:05

安装

发给 Agent
帮我安装这个技能:npx secure-skills-cli add ningtoba/event-monitor
兼容性
通用兼容
联网要求
不联网
数据出网
数据不出本机
Metadata
name
predictive-monitoring
description
Predicts CPU spikes using Random Forest regressor, monitors system resources, saves metrics, and generates Excel reports.
metadata
{"user-invocable":true}

Predictive Monitoring Skill

This skill monitors system resources and predicts future CPU spikes based on past data.

Commands

/collect-metrics

Triggers a collection of the top 10 CPU and Memory consuming processes. The results are saved to a local SQLite database monitoring.db.

/predict-usage

Analyzes collected CPU metrics, trains a Random Forest model, and predicts CPU behavior for the next 24 hours. High CPU usage alerts (Amber, Red) are saved to the Alert table.

/generate-report

Generates an Excel report of the latest captured metrics.

Instructions for Agent

To collect metrics (without prediction), run python {baseDir}/monitoring.py. To collect metrics and run predictive analysis, run python {baseDir}/monitoring.py --predict. To verify the database, look for monitoring.db in the skill directory.