Skip to main content

Pangu RCA CLI - AI-powered log analysis tool

Project description

Pangu RCA CLI

PyPI version Python Versions License

AI-powered log analysis tool for developers. Analyze error logs directly from your terminal.

Installation

pip install pangu-rca

Quick Start

# Analyze a log file
pangu-rca analyze error.log

# Analyze with English output
pangu-rca analyze error.log --lang en

# Pipe log content directly
cat error.log | pangu-rca analyze --stdin

# Get JSON output (for scripting)
pangu-rca analyze error.log --output json

# Check service health
pangu-rca health

Examples

Analyze a Java error log

$ pangu-rca analyze java_error.log
============================================================
🔍 Pangu RCA Agent - 分析结果
============================================================

📋 问题类型: 数据库连接超时
🎯 置信度: 95.0%

📝 详细原因:
   数据库连接池配置过小,导致在高并发场景下连接被耗尽...

🔑 关键证据:
   1. java.sql.SQLException: Connection timeout
   2. Caused by: java.sql.SQLTimeoutException: Timeout waiting for connection

💡 修复建议:
   增加数据库连接池的最大连接数,建议从 10 调整为 50...

Pipe from another command

# Analyze Docker container logs
docker logs my-container 2>&1 | pangu-rca analyze --stdin

# Analyze system logs
journalctl -u my-service --no-pager | pangu-rca analyze --stdin --lang en

Options

Option Description Default
--lang Output language: zh or en zh
--output Output format: text or json text
--api-url Custom API endpoint https://www.pangulab.com/api/analyze

Commands

  • pangu-rca analyze <file> — Analyze a log file
  • pangu-rca analyze --stdin — Read logs from stdin
  • pangu-rca health — Check API service status
  • pangu-rca --version — Show version
  • pangu-rca --help — Show help

About

Pangu RCA Agent is an AI-powered log analysis tool that helps developers quickly identify root causes of errors from application logs. It supports Java, Python, Go, Rust, JavaScript, and many other programming languages.

Web version: https://www.pangulab.com

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pangu_rca-0.1.0.tar.gz (5.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pangu_rca-0.1.0-py3-none-any.whl (5.6 kB view details)

Uploaded Python 3

File details

Details for the file pangu_rca-0.1.0.tar.gz.

File metadata

  • Download URL: pangu_rca-0.1.0.tar.gz
  • Upload date:
  • Size: 5.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.18

File hashes

Hashes for pangu_rca-0.1.0.tar.gz
Algorithm Hash digest
SHA256 8885d44e61959e33cdb261647b2af703d66eb54a51204cad0df438b79a653d52
MD5 012cc29871ddc72bed321f60229a2da8
BLAKE2b-256 8a25021eedce0b907c3cce00e7c13ba3cad57f4d7468d00825f7da9db469a630

See more details on using hashes here.

File details

Details for the file pangu_rca-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: pangu_rca-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 5.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.18

File hashes

Hashes for pangu_rca-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9458a3440931264ae003257ae5cc607885fb9444c79e3fc89b568c7e5bb10e89
MD5 e843999d6ab94ddcb0f6dc2a0de5f7b8
BLAKE2b-256 e45b8a569b1b65e5e007ba9a6bfc9a95002c396dfbca2a16c038204cd8cdb573

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page