Bỏ qua tới nội dung
TakoAPI
Quay lại kỹ năng

log-dive

bởi tkuehnl

DevOps & Cloud
490Lượt tải do clawskills.sh công bố
0Lượt xem
0 lượt thíchĐăng nhập để thích kỹ năng này
—Chưa có đánh giá
Đánh giá của bạn

Tóm tắt

Unified log search across Loki, Elasticsearch, and CloudWatch.

Mô tả

Kỹ năng này làm gì

Searches logs across Loki, Elasticsearch/OpenSearch, and AWS CloudWatch from a single interface. Natural language queries are translated to the appropriate query language (LogQL, ES DSL, or CloudWatch filter patterns) before execution. Read-only, it never modifies or deletes log data.

Instead of switching between Grafana, Kibana, and CloudWatch consoles and writing different query languages for each, you can search all configured backends with plain English from one place.

Khi nào nên dùng

  • Triaging a production incident by finding errors across checkout and payment services
  • Discovering which services threw exceptions during a specific time window
  • Verifying a deployment did not introduce new error types
  • Tailing live logs from a specific microservice
  • Correlating errors between two dependent services to trace a root cause

Quy trình ví dụ

ĐẦU VÀO

User asks: Find error logs from the checkout service in the last 30 minutes

AGENT
  1. 1

    Checks which log backends are configured by running the backends script

  2. 2

    Translates the request into the appropriate query language for each configured backend

  3. 3

    Executes the search with a 30-minute time window and a default limit of 200 entries

  4. 4

    Groups results by error type, counts occurrences, and builds a chronological timeline

  5. 5

    Returns a structured summary with error patterns, root cause hypothesis, and recommended actions

ĐẦU RA

Incident summary showing 47 log entries: 23 NullPointerExceptions starting at 14:02, 18 database connection timeouts from 14:05, root cause identified as an exhausted connection pool in the checkout service

Yêu cầu

  • LOKI_ADDR environment variable (Loki server URL, required for Loki backend)
  • LOKI_TOKEN environment variable (if Loki requires bearer token authentication)
  • LOKI_TENANT_ID environment variable (if using Loki multi-tenancy)
  • ELASTICSEARCH_URL environment variable (required for Elasticsearch/OpenSearch backend)
  • ELASTICSEARCH_TOKEN environment variable (if Elasticsearch requires authentication)
  • AWS credentials via AWS_PROFILE or AWS_ACCESS_KEY_ID, plus AWS_REGION (required for CloudWatch backend)
  • logcli binary installed (Grafana Loki CLI, required for the Loki backend)

Cài đặt

clawhub install tkuehnl/log-dive

Chạy lệnh CLI, hoặc dán prompt vào Claude Code, Cursor, Codex hay coding agent bạn đang dùng.

Liên kết