🎁 Get the FREE AI Skills Starter GuideSubscribe →
BytesAgainBytesAgain
🦀 ClawHub

dataworks-diagnoser

by @ljw-git-dw

Fetch and analyze Alibaba Cloud DataWorks task instance logs to diagnose failures and get actionable recommendations using your instance ID and credentials.

When to Use
TriggerAction
- DataWorks task instance failed and you need to know why
- You have an instance ID and need to fetch error logs
- You want automated diagnosis and solutions for task failures
- Troubleshooting ODPS SQL, Data Integration, Shell, Python nodes
- Need to analyze error patterns across multiple failures
- Preparing incident reports for failed tasks
💡 Examples

Example 1: Quick Diagnosis

python3 scripts/dataworks_diagnose.py 123456789

Example 2: Save Report

python3 scripts/dataworks_diagnose.py 123456789 --save-report diagnosis.txt

Example 3: Different Region

python3 scripts/dataworks_diagnose.py 123456789 --region cn-shanghai

Example 4: Analyze Saved Log

python3 scripts/diagnose_log.py saved_log.txt --instance-id 123456789

Example 5: Batch Analysis

for id in 123 456 789; do
  python3 scripts/diagnose_log.py --instance-id $id < log_$id.txt
done

⚙️ Configuration

1. Alibaba Cloud Credentials

One of the following is required:

Option A: Environment Variables (Recommended)

export ALIBABA_CLOUD_ACCESS_KEY_ID=your_access_key
export ALIBABA_CLOUD_ACCESS_KEY_SECRET=your_access_secret

Option B: Config File Create ~/.alibabacloud/credentials:

{
  "access_key_id": "your_access_key",
  "access_key_secret": "your_access_secret"
}

Option C: Aliyun CLI Config If you have Aliyun CLI configured, credentials will be loaded automatically.

2. Required Permissions

The AccessKey needs these permissions:

  • dataworks:GetInstanceLog - Fetch task instance logs
  • dataworks:QueryTask - Query task information
  • 3. Network Access

  • Access to Alibaba Cloud API endpoints
  • If using VPC, ensure proper network configuration
  • 📋 Tips & Best Practices

    💡 Pro tips:

    1. Save logs for failed tasks - Use --save-log to keep records 2. Generate reports - Use --save-report for documentation 3. Batch processing - Script supports multiple instance IDs 4. JSON output - Use --json for programmatic processing 5. Region matters - Always use the correct region for your workspace

    View on ClawHub
    TERMINAL
    clawhub install dataworks-diagnoser

    🧪 Use this skill with your agent

    Most visitors already have an agent. Pick your environment, install or copy the workflow, then run the smoke-test prompt above.

    🔍 Can't find the right skill?

    Search 60,000+ AI agent skills — free, no login needed.

    Search Skills →