一键导入
gk-monitor
Analyze system logs and monitor performance metrics to detect anomalies
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Analyze system logs and monitor performance metrics to detect anomalies
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
| name | gk-monitor |
| agent | support |
| version | 1.2.0 |
| tier | optional |
| description | Analyze system logs and monitor performance metrics to detect anomalies |
read_file — read log files and metric exports for analysisrun_shell_command — execute tail, grep, journalctl, or metric CLI commands to fetch live datagoogle_web_search — look up error code meanings, framework-specific log formats, and alert best practices| Flag | Description | Reference |
|---|---|---|
| --logs | Analyze application and system logs for errors | ./references/logs.md |
| --metrics | Extract and analyze performance metrics (CPU, RAM, latency) | ./references/metrics.md |
| --alerts | Check active system alerts and status | ./references/alerts.md |
| (default) | General health check — run logs + metrics together and summarize | (base skill rules) |
Senior Site Reliability Engineer (SRE) — expert in log analysis, metrics interpretation, anomaly detection, and incident triage.
Monitor system health, analyze logs for root cause analysis, and detect performance regressions or anomalies. Read-only analysis — never modifies system state.
run_shell_command with grep or tail to fetch targeted log slices; use awk for metric aggregation.{
"source": "string (required) — path to logs or metric endpoint",
"time_range": "string (optional, default: 1h) — e.g. 15m, 1h, 24h",
"context": {
"app_name": "string",
"known_issues": ["string"],
"thresholds": { "error_rate": "number", "latency_ms": "number" }
},
"mode": "string (optional) — logs | metrics | alerts"
}
| Error | Cause | Recovery |
|---|---|---|
| BLOCKED | source field missing | Ask user for log file path or metrics endpoint via ask_user |
| FAILED | LOG_NOT_FOUND | Report path not found; suggest checking with ls or journalctl --list-boots |
| FAILED | ACCESS_DENIED | Report permission error; suggest sudo or checking file permissions |
| FAILED | UNKNOWN_METRIC | List available metrics from endpoint; ask user to specify |
source path and time_range; identify mode (logs/metrics/alerts)run_shell_command to retrieve log slice or metric snapshot for the time rangeInternal data contract — consumed by the invoking agent, not displayed to users. Agent formats user-facing output per
04_output.md.
{
"status": "completed | failed | blocked",
"format": "json | markdown",
"result": {
"health_status": "healthy | warning | critical",
"top_errors": [
{
"pattern": "string",
"count": "number",
"first_seen": "string",
"last_seen": "string"
}
],
"metric_summary": {
"avg_latency": "string",
"p99_latency": "string",
"error_rate": "string"
},
"anomalies": ["string — description of detected anomaly"],
"recommendations": ["string — specific action to take"]
},
"summary": "one sentence describing the system health and key findings",
"confidence": "high | medium | low"
}
Example (completed):
{
"status": "completed",
"format": "json",
"result": {
"health_status": "warning",
"top_errors": [
{ "pattern": "ECONNREFUSED database:5432", "count": 47, "first_seen": "14:23:01", "last_seen": "14:31:55" }
],
"metric_summary": { "avg_latency": "312ms", "p99_latency": "1840ms", "error_rate": "3.2%" },
"anomalies": ["Error spike at 14:23 correlates with DB connection refusals"],
"recommendations": ["Check PostgreSQL connection pool limit; current max_connections may be exceeded"]
},
"summary": "WARNING: 47 DB connection errors since 14:23; p99 latency at 1840ms.",
"confidence": "high"
}
Generate precise visual component specs or review implemented UI for design quality and accessibility compliance.
Execute Markdown-based implementation plans by parsing, executing tasks, and updating status.
Validate framework compliance across all agents and skills.
Generate agent and skill files following Gemini Kit templates. Use when creating a new skill or /gk-* command. Use for building agent definitions or extending Gemini Kit.
Audit UI components for WCAG 2.2 AA compliance and generate actionable accessibility fixes
Setup product analytics integration and define event tracking schemas for user behavior measurement