← 返回
未分类 中文

server-log-analysis-en

Connect to remote servers over SSH, read sibling config.yaml to understand service metadata and log locations, download only required log snippets to local t...
通过SSH连接远程服务器,读取同级 config.yaml 了解服务元数据和日志位置,仅下载所需的日志片段到本地
hgvgfgvh
未分类 clawhub v1.0.0 1 版本 100000 Key: 无需
★ 0
Stars
📥 635
下载
💾 0
安装
1
版本
#latest

概述

Server Log Analysis

Purpose

Use this Skill to investigate service issues when logs are stored on remote servers.

This Skill assumes:

  • The agent can connect to servers via SSH or equivalent remote execution tooling.
  • config.yaml in this Skill directory defines service metadata, log paths, and business context.
  • Before deep analysis, relevant log snippets should be copied to local temp/ first.

Required Reading

  • Read config.yaml first.
  • Read reference.md when field details or command patterns are needed.

Core Workflow

  1. Read config.yaml.
  2. Map the user issue to one or more configured services.
  3. Define the smallest necessary investigation scope:
    • target service
    • target host
    • relevant time window
    • candidate log files
  4. Connect to the target server via SSH or available remote tools.
  5. Perform remote checks before downloading:
    • file existence and file size
    • last modified time
    • whether keyword filtering or tail output is sufficient
  6. Download only minimal required log snippets to configured local temp/.
  7. Analyze local copies for errors, timing correlation, repeated failures, and likely root cause.
  8. Output concise diagnosis with conclusions, evidence, uncertainty, and follow-up actions.

Investigation Rules

  • Prioritize service definitions and business context in config.yaml; do not guess.
  • Prefer remote filtering before full download:
  • narrow time window first
  • then filter by keywords
  • use tail first for recent incidents
  • Download full logs only when snippets are insufficient.
  • Local filenames should clearly include service, host, and time range.
  • Unless explicitly requested, do not fetch sensitive files, binaries, or unrelated large archives.
  • For cross-service issues, analyze primary service first, then expand to dependencies.

Service Selection

When user intent is ambiguous:

  1. Use service aliases, keywords, and description in config.yaml.
  2. Pick the service with the highest semantic match.
  3. If still unclear, ask the user which service to inspect before remote connection.

Remote Pre-Check Checklist

Before downloading logs, confirm:

  • host configuration matches target service
  • configured log files exist
  • which log file was updated most recently
  • whether rolling logs must be included
  • whether issue is recent or historical

Common remote checks include:

  • file metadata checks
  • recent log tail checks
  • quick keyword search
  • time-window extraction
  • process/service status when needed

Local Download Rules

Store downloaded logs under configured local_temp_dir.

Recommended filename format:

______.log

Priority order:

  1. recent tail logs
  2. keyword-filtered snippets
  3. explicit time-window snippets
  4. full file as last resort

Analysis Focus

Focus on:

  • startup failures
  • repeated exceptions
  • timeout and connection issues
  • resource pressure signals
  • failures in DB/cache/message queue/DNS/HTTP upstream dependencies
  • config errors exposed by stack traces or startup logs
  • timestamp alignment across related services

The response should include:

  • issue summary
  • key evidence
  • preliminary cause
  • confidence level
  • next verification steps

Security Constraints

  • Treat config.yaml as operations metadata; do not store plaintext secrets.
  • Prefer environment variables, key files, or external secret managers for SSH credentials.
  • Unless explicitly requested, do not modify remote files or restart services.
  • Unless requested, do not auto-delete downloaded logs.

Exception Handling

If remote access fails:

  1. Clearly state which step failed.
  2. State target host and service.
  3. Ask user for correct SSH access method, network path, or credentials.

If configured log path does not exist:

  1. Clearly identify missing path.
  2. Check whether alternate paths are configured for the same service.
  3. Ask user whether deployment paths changed.

Quick Execution Order

Always follow this order:

  1. Read config.yaml.
  2. Identify service and host.
  3. Perform remote log pre-checks.
  4. Copy minimal required logs to temp/.
  5. Analyze locally.
  6. Summarize conclusions with evidence.

版本历史

共 1 个版本

  • v1.0.0 当前
    2026-05-02 16:52 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

ai-architecture-harness-zh

hgvgfgvh
建立 AI 编程架构护栏,防止架构坍缩、功能回退和迭代漂移。适用于提及 AI 编程、Agent 编程、架构坍缩、Harness Engineering、设计意图、验收规则、黄金法则、架构测试,或希望代码库更适合 AI Agent 安全修改的
★ 0 📥 835

server-log-analysis

hgvgfgvh
通过 SSH 连接远程服务器,读取同级 config.yaml 理解服务信息与日志位置,按需下载相关日志片段到本地 temp 目录,并分析日志定位问题。适用于用户要求排查远程服务日志、分析服务端异常或基于 SSH 访问进行日志诊断的场景。
★ 0 📥 816

LinkSKILL

hgvgfgvh
通用 API 集成技能,面向企业平台。使用 Swagger/OpenAPI 发现机制连接任意平台。
★ 0 📥 13,032