Aliyun Log Service Query for Openclaw

A professional CLI-based skill for querying and analyzing Alibaba Cloud SLS logs using advanced SQL capabilities.

jeweis
v1.0.0
Mar 22, 2026
0
661
0

Install & Download

1. ClawHub CLI

The fastest way to install a skill directly from the registry.

npx clawhub@latest install aliyun-log-query

2. Manual Installation

Copy the skill folder to one of these locations

Global
~/.openclaw/skills/
Workspace
<project>/skills/

Priority: Workspace > Local > Bundled

3. Prompt Installation

Copy this prompt to OpenClaw to install it automatically.

Help me install aliyun-log-query using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).

Prefer to download?

Get the raw skill files in a ZIP archive.

What is Aliyun Log Service Query?

The Aliyun Log Query skill enables AI agents and developers to interact seamlessly with Alibaba Cloud Log Service (SLS). It provides a robust interface for fetching logs, performing data analysis, and managing logstores directly through command-line operations. As part of the Openclaw Skills ecosystem, it bridges the gap between raw cloud logs and actionable insights.

By leveraging the Aliyun Log CLI, this skill allows for complex data manipulation using Power SQL mode. It is designed to handle high-volume log environments while maintaining performance through smart filtering and limit controls, ensuring your AI context remains clean and relevant.

Aliyun Log Service Query Use Cases

  • Troubleshooting production errors by filtering logs with specific keywords like ERROR or CRITICAL.
  • Monitoring web traffic by grouping and counting status codes or request URLs.
  • Auditing system activity over specific time ranges for security or compliance.
  • Automated reporting on resource usage metrics extracted from cloud logs.

How Aliyun Log Service Query Works

  1. Authentication: The skill checks for credentials via command-line parameters, environment variables, or the local config file.
  2. Parameter Mapping: Commands like aliyunlog log are mapped directly to the LogClient methods in the Aliyun SDK.
  3. Query Construction: The skill converts user input into a structured SQL WHERE clause or a full SQL statement.
  4. Execution: It executes the query against the specified Aliyun project and logstore with Power SQL enabled for enhanced processing.
  5. Formatting: Results are returned as formatted, non-escaped JSON for easy parsing by agents or other tools.

Aliyun Log Service Query Setup

First, install the Aliyun Log CLI using uv:

uv pip install -U aliyun-log-cli

Verify the installation:

aliyunlog --version

Configure your credentials (recommended):

aliyunlog configure <access_id> <access_key> <endpoint>

Aliyun Log Service Query Data Schema & Taxonomy

The skill returns structured JSON data to ensure compatibility with downstream automation in Openclaw Skills.

Field Type Description
logs Array A list of log entries matching the query criteria.
count Integer The number of logs returned in the current batch.
total Integer The total count of logs found for the given criteria.

Standard output format can be enforced using --format-output=json,no_escape.

Aliyun Log Service Query Advanced Features

  • Power SQL Support: Enable advanced analytics by setting --power_sql=true for complex aggregations.
  • Automatic Project Mapping: Integration with local reference files to resolve project names and logstores dynamically.
  • Flexible Time Formatting: Supports both human-readable strings (e.g., "2026-03-18 10:00:00") and Unix timestamps.
  • Output Customization: Configurable global output formats to bypass default shell escaping issues.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*