Huawei Cloud Cce Log Analyzer logo

Huawei Cloud Cce Log Analyzer

Organization
huaweicloud
huawei-cloud-cce-log-analyzer

Query and analyze Huawei Cloud CCE workload, audit, and control-plane logs. Use when investigating CCE logs, Kubernetes logs, Pod logs, application logs, audit logs, LTS logs, kube-apiserver logs, kube-scheduler logs, log analysis, log collection, 日志查询, 日志分析, 审计日志, 调度器日志.

Overview

Publisherhuaweicloud
Repositoryhuaweicloud-skills
Skill namehuawei-cloud-cce-log-analyzer
Stars
59
Forks
24
Bundled files
24
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 24 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by huaweicloud on GitHub. Read the source before you install it.

Installation

Install the Huawei Cloud Cce Log Analyzer AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/huaweicloud/huaweicloud-skills/tree/master/skills/container/cce/huawei-cloud-cce-log-analyzer
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/huaweicloud/huaweicloud-skills.git /tmp/huaweicloud-skills
mkdir -p .claude/skills
cp -r /tmp/huaweicloud-skills/skills/container/cce/huawei-cloud-cce-log-analyzer .claude/skills/huawei-cloud-cce-log-analyzer
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Huawei Cloud Cce Log Analyzer in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Huawei Cloud Cce Log Analyzer on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Huawei Cloud Cce Log Analyzer is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Huawei Cloud CCE Log Analyzer

Overview

Use this skill for read-only log queries and analysis, or for confirmed management of CCE LogConfig and LTS Access Config collection rules. It does not modify workloads, log groups, log streams, LTS log data, or unrelated cloud resources.

NeedUse
Pod stdout/stderr or previous container outputPod log tools
Application logs collected to LTSApplication log workflow; locate by namespace + app_name or use a rule selector
Pod/workload operation history and actorAudit log tools
API status codes and latencykube-apiserver log tools
Pending Pods and scheduler decisionskube-scheduler log tools
Create or remove collection rulesLogConfig or LTS Access Config tools with preview and confirmation

Prerequisites

  • Python 3.8+, hcloud (≥ 7.2.2), and credentials with the required CCE and LTS permissions.
  • Pod stdout and CCE LogConfig tools require kubectl with the kubectl cce plugin for cluster access.
  • kubectl cce dependency: The kubectl cce plugin provides CCE cluster access. Install it through the dedicated kubectl-cce installer skill. Follow the plugin usage contract.
  • The Cloud Native Logging add-on is required for CCE LogConfig tools. LTS AGENT collection requires a healthy iCagent.
  • Audit, kube-apiserver, and kube-scheduler tools require their matching CCE Log Center switch. The tools check the switch through CCE ShowClusterConfig and never enable it.
  • Explicit --cli-access-key, --cli-secret-key, and optional --cli-security-token use only the supplied credentials. AK/SK must be supplied together, and a token requires that pair. They are forwarded to hcloud and kubectl cce; profile and credential environment-variable fallback are disabled. --cli-project-id or project_id can provide the target project when required. Without explicit CLI credentials, the order is ak/sk/project_id, local hcloud profile, then HW_ACCESS_KEY, HW_SECRET_KEY, and HW_PROJECT_ID.
  • LTS start_time and end_time use UTC YYYY-MM-DD HH:MM:SS. If omitted, the tools generate a recent UTC window.

Environment Variables

Environment VariableRequiredDescription
SKILL_QUALITY_ENDPOINTNoReporting endpoint, default https://skillsapi.developer.myhuaweicloud.com/api/quality/report
SKILL_QUALITY_NAMENoSkill name (auto-detected)
SKILL_QUALITY_DISABLENoSet to 1 to disable reporting (local debugging)
SKILL_QUALITY_TIMEOUTNoReport timeout in seconds (default 3)

Region Selection

  • Use region=<region> from the current user request or established task context when it is available.
  • If no region parameter is supplied, use HW_REGION_NAME.
  • If neither source provides a region, return an error asking the user to provide region or set HW_REGION_NAME. Do not infer a target region from an hcloud profile or any other environment variable.

Core Commands And Tool Routing

ToolRiskPurpose
huawei_get_pod_stdout_logsR3Get current or previous Pod stdout/stderr
huawei_analyze_pod_stdout_realtime_logsR3Sample newly produced Pod stdout and analyze it
huawei_get_cce_logconfigsR3List CCE Cloud Native Logging rules
huawei_list_lts_access_configsR3List LTS collection rules
huawei_query_application_logsR3Query application logs from an explicit or uniquely discovered collection rule
huawei_analyze_application_logsR3Analyze application logs from an explicit or uniquely discovered collection rule
huawei_query_cce_audit_logsR3Query retained Kubernetes audit events
huawei_analyze_cce_audit_timelineR3Build a resource change timeline from audit events
huawei_query_kube_apiserver_logsR3Query kube-apiserver control-plane logs
huawei_analyze_kube_apiserver_logsR3Analyze API status codes, errors, and latency
huawei_query_kube_scheduler_logsR3Query kube-scheduler control-plane logs
huawei_analyze_kube_scheduler_logsR3Analyze scheduling, binding, preemption, and leader-election messages
huawei_create_cce_logconfigR2Preview and create a CCE LogConfig rule
huawei_create_lts_access_configR2Preview and create an LTS Access Config rule
huawei_delete_cce_logconfigR1Preview and remove a CCE LogConfig rule
huawei_delete_lts_access_configR1Preview and remove an LTS Access Config rule

Use python3 scripts/huawei-cloud.py help to print the available actions and required parameters. Full invocation and parameter details are in references/tool-reference.md.

Parameters And Collection Scope

Input Parameter Validation

Required parameters must be provided before execution. A required cluster_id, or an optional cluster_id supplied by the user, must pass the following validation before any cluster-targeted request. Query tools may query the region globally only when their optional cluster_id is omitted:

  1. Check whether cluster_id is a standard UUID:
    • UUID: call hcloud CCE ShowCluster to verify it.
    • Otherwise: call hcloud CCE ListClusters, perform an exact and unique name match, convert it to a UUID, then call ShowCluster to verify it. If a required cluster_id is missing, or any supplied cluster_id is invalid, unmatched, or ambiguous, stop the operation and require the user to provide the correct region and cluster ID. A supplied invalid cluster_id must never fall back to a global query; never guess or select a cluster. For any other required resource identifier, first use the corresponding read-only query tool to list candidates when the user cannot provide an unambiguous value, then ask the user to choose; never select a candidate automatically.

Input Parameters

ParameterRequiredDescription
regionYesRegion from request context or HW_REGION_NAME; otherwise ask the user.
cluster_idOperation-specificTarget CCE cluster UUID, or an exact cluster name resolved and verified through hcloud. Required for Pod, LogConfig, audit, control-plane, and application-log operations.
project_idOptionalTarget project ID. Required by some kubectl cce paths; explicit credentials or hcloud profile may supply it where supported.
namespace, pod_name, containerOperation-specificPod stdout queries require both namespace and pod_name; container narrows a multi-container Pod.
logconfig_name, access_config_id, access_config_nameOperation-specificOptional explicit collection-rule selector. Without one, application-log tools require namespace plus app_name and discover matching rules.
log_group_id, log_stream_idCreate onlyUser-selected LTS destination IDs for LogConfig or LTS Access Config creation.
hours, start_time, end_timeOptionalNarrow bounded query window; start with hours=1 when the user has not specified a window.
keywordsOptionalLTS keyword filter. Do not use it for an unscoped abnormal-ratio analysis unless the user requests keyword-scoped analysis.
limit, max_pages, auto_paginate, sample_limitOptionalResult and analysis bounds; expand only when the initial result is insufficient.
--cli-access-key, --cli-secret-key, --cli-security-tokenOptionalExplicit credentials forwarded unchanged to hcloud and kubectl cce.

Tool Parameters

ToolRequiredOptional
huawei_get_pod_stdout_logsregion, cluster_id, namespace, pod_namecontainer, previous, tail_lines
huawei_analyze_pod_stdout_realtime_logsregion, cluster_id, namespace, pod_namecontainer, wait_seconds, tail_lines
huawei_get_cce_logconfigsregion, cluster_idnamespace, project_id
huawei_list_lts_access_configsregionaccess_config_name
huawei_query_application_logsregion, cluster_id, and either one rule selector or namespace + app_namehours, start_time, end_time, keywords, labels, output, sample_limit, auto_paginate, max_pages, limit
huawei_analyze_application_logsregion, cluster_id, and either one rule selector or namespace + app_nameQuery options plus sample_limit
huawei_query_cce_audit_logsregion, cluster_idaudit_type, pod_name, resource_name, namespace, hours, start_time, end_time
huawei_analyze_cce_audit_timelineregion, cluster_idresource_name, resources, namespace, verbs, hours, timeline_limit, include_read_events
huawei_query_kube_apiserver_logsregion, cluster_idhours, start_time, end_time, keywords, limit, max_pages, auto_paginate
huawei_analyze_kube_apiserver_logsregion, cluster_idhours, slow_latency_ms, limit, max_pages, auto_paginate, sample_limit
huawei_query_kube_scheduler_logsregion, cluster_idhours, start_time, end_time, keywords, limit, max_pages, auto_paginate
huawei_analyze_kube_scheduler_logsregion, cluster_idhours, limit, max_pages, auto_paginate, sample_limit
ToolRequiredOptionalNotes
huawei_create_cce_logconfigregion, cluster_id, logconfig_name, source_typeSource-specific selector or file fields, destination IDs, update_existing, confirmA confirmed create requires the source-specific selector/file fields and user-selected log_group_id plus log_stream_id.
huawei_delete_cce_logconfigregion, cluster_id, logconfig_namelogconfig_namespace, confirmPreview the exact rule before confirmation.
huawei_create_lts_access_configregion, access_config_nameaccess_config_type, collection-source fields, destination IDs, confirmA confirmed create requires collection-source fields and user-selected log_group_id plus log_stream_id.
huawei_delete_lts_access_configregion, access_config_idconfirmPreview the exact rule before confirmation.

Collection Scope

Use the parameter that controls the collection source, not the namespace where a LogConfig object is stored.

Collection modeNamespace parameterScope
CCE LogConfig, one workload stdout or container fileworkload_namespace (or namespace) with workload_name/app_nameOne workload in one namespace.
CCE LogConfig, all container stdout in selected namespacesall_containers=true and namespaces='["default"]'All container stdout in the listed namespaces. Use a JSON array or default,kube-system; [default] is invalid. Omit namespaces only when all namespaces are intended.
LTS Access Config, K8S_CCE container stdout or filenamespace_regex, for example ^default$Namespace regex; pod_name_regex is also required.
Node file collectionNonehost_file applies to all eligible nodes in the bound host group. Namespace filtering does not apply.

For huawei_get_pod_stdout_logs and huawei_analyze_pod_stdout_realtime_logs, both pod_name and namespace are required. Do not infer the namespace or fall back to default.

logconfig_namespace is only the Kubernetes namespace that stores the LogConfig custom resource, normally kube-system; it does not limit which application logs are collected. Review the previewed request_body before confirmation.

namespaces Input

Use namespaces only with source_type=container_stdout all_containers=true to limit collection to one or more application namespaces. It is not the LogConfig storage namespace and is not the single-workload namespace selector.

Intended scopeInput
One namespacenamespaces='["default"]' or namespaces=default
Multiple namespacesnamespaces='["default","kube-system"]' or namespaces=default,kube-system
Every namespaceOmit namespaces entirely, only after the user explicitly requests cluster-wide collection.

Quote JSON arrays so the shell passes them unchanged. Each value must be a valid Kubernetes namespace name. [default] is not a valid input format.

Operating Workflow

1. Identify the source

  • A named Pod: use huawei_get_pod_stdout_logs first.
  • A named application: provide namespace and app_name; query LTS first through huawei_query_application_logs. A unique collection rule is discovered automatically, while multiple matches are presented for the user to choose. Only when no usable collection rule exists may the workflow use huawei_get_pod_stdout_logs; require the user to provide the Pod name and do not select one automatically.
  • Who changed or deleted a resource: use audit logs first. Audit evidence contains actor information; kube-apiserver logs are supplemental HTTP evidence only.
  • API availability or latency: use kube-apiserver analysis. Read non_success_status_count for failed HTTP requests and non_watch_latency for ordinary API latency.
  • Pending or unschedulable workloads: use kube-scheduler analysis. Repeated scheduling/preemption messages are retries, not separate Pods.

2. Query narrowly, then expand

Start with hours=1, a specific namespace, Pod, or selected collection rule. Use auto_paginate=true, limit, and max_pages only when the initial result is insufficient. Do not apply keywords before an application-log abnormal-ratio analysis unless the user explicitly requests keyword-scoped analysis.

For application logs from a shared LTS stream, inspect filter_quality before attributing findings: exact means indexed clusterId, nameSpace, and appName labels were applied; partial or unscoped means returned logs can include other applications, so all statistics apply only to the returned set.

Application queries default to output=summary; use output=samples for a bounded sample or output=raw only when full log entries are required. The tool checks indexed aliases including clusterId/cluster_id/k8s.cluster.id, nameSpace/namespace/k8s.namespace.name, and appName/app.kubernetes.io/name/app before it sends label filters to LTS. It also validates app_name against current Deployment, StatefulSet, DaemonSet, Job, and CronJob resources in the specified namespace. An unmatched result is a warning, not a query failure, because historical logs can outlive workloads.

When an application query returns no logs, the result includes a prompt to verify namespace and app_name. If current workload validation is also unmatched, the prompt explicitly calls out that the supplied application name may be incorrect.

3. Interpret before acting

  • A missing audit event does not disprove an operation; it may be outside retention or absent from audit delivery. Search kube-apiserver logs for the request when that switch is enabled, but do not infer the actor from its user agent alone.
  • kube-apiserver WATCH duration is connection lifetime, not normal request-processing latency. Use summary.non_watch_latency for performance conclusions.
  • kube-scheduler preemption_issue can accompany a scheduling failure caused by hard constraints such as PV node affinity or pod anti-affinity. Inspect the affected Pod and constraints before recommending capacity changes.
  • Redact secrets, tokens, authorization headers, cookies, and personal data in all summaries.

4. Mutate only after confirmation

For R2 and R1 tools, discover the destination or exact target, call the tool without confirm=true, show the preview, and wait for explicit user confirmation before calling again with confirm=true. The skill never creates or selects an LTS log group or stream automatically; the user must provide the selected destination IDs.

Parameter Confirmation

Risk LevelToolsConfirmation Required
R3All query and analysis toolsNo — read-only, may run automatically
R2huawei_create_cce_logconfig, huawei_create_lts_access_configYes — preview the exact collection scope and destination, then wait for explicit user confirm=true
R1huawei_delete_cce_logconfig, huawei_delete_lts_access_configYes — preview the exact existing rule, then wait for explicit user confirm=true

Confirmation Flow

Call without confirm=true → Preview output → User reviews → User confirms → Call with confirm=true
  • Do not skip preview for any LogConfig or LTS Access Config operation
  • Do not call with confirm=true without showing the preview first
  • Do not assume the preview is correct without user verification

KooCLI Command Format Standard

bash
hcloud <Service> <Operation> --cli-region=<region> [--key=value ...]
FeatureDescription
Service nameUse the actual service name as detected from KooCLI metadata: CCE, LTS
Operation namePascalCase, e.g., ListClusters, ShowCluster, ListAccessConfig, ListLogs
Region parameter--cli-region=<value>
Simple parameter--key=value
Indexed parameter--key.1=value1 for array parameters

Verified CLI Commands

OperationRequired Parameters
hcloud CCE ListClusters--project_id
hcloud CCE ShowCluster--cluster_id, --project_id
hcloud CCE ShowClusterConfig--cluster_id, --project_id
hcloud LTS ListLogGroups--project_id
hcloud LTS ListLogStream--log_group_id, --project_id
hcloud LTS ListLogs--log_group_id, --log_stream_id, --start_time, --end_time, --project_id
hcloud LTS ListAccessConfig--project_id
hcloud LTS CreateAccessConfig--access_config_name, --access_config_type, --log_info.log_group_id, --log_info.log_stream_id, --project_id
hcloud LTS DeleteAccessConfig--access_config_id_list.[N], --project_id
hcloud LTS ListHostGroup--project_id

References

ReferenceRead when
workflow.mdFollowing Pod, application, audit, control-plane, or collection-rule workflows
tool-reference.mdChoosing parameters or running a command
risk-rules.mdEvaluating risk, confirmation, or data-security boundaries
output-schema.mdInterpreting query and analysis results
kubectl-cce.mdUsing the kubectl cce plugin for cluster access
iam-policies.mdRequired IAM policies and least-privilege permissions
cli-installation-guide.mdInstalling and configuring KooCLI and dependencies
verification-method.mdVerifying toolchain, connectivity, and each action before relying on the skill
acceptance-criteria.mdReviewing acceptance criteria and expected results per tool

Quality Reporting

This Skill integrates skill_quality_sdk.py for execution quality reporting. Every run automatically reports trace_id, status (success/biz_fail/sys_fail/cancel), error code, cost, and masked input/output to the operations console.

Integration

  • Python entry point: wrap main logic with quality_context context manager:
    python
    from skill_quality_sdk import quality_context, QualityError
    
    with quality_context(skill_name="huawei-cloud-cce-log-analyzer", skill_version="1.0.0") as q:
        q.input = {...}
        result = do_something()
        q.output = result
  • CLI-only Skill: the SDK is vendored in scripts/ for future Python wrapper use.

Error Code Convention

PrefixCategoryExamples
UUser inputU01 missing param, U03 no data found
CConfigurationC01 missing AK/SK/env
NNetworkN01 timeout, N02 connection refused
BCode bugB01 null pointer, B04 version mismatch
PPlatformP01 scheduler error, P02 resource insufficient

Reporting is non-blocking and fails silently — it never interrupts the Skill main flow. Disable via SKILL_QUALITY_DISABLE=1 for local testing.

Output Format

See output-schema.md for the response shape. Summaries include the target, time window, source, findings, and any query limits.

Verification

Confirm the returned source, time window, and collection-rule or Pod target match the requested scope before interpreting results.

Best Practices

Start with a narrow namespace, Pod, time window, or application identity. For application logs, a unique discovered collection rule is used automatically; multiple matching rules are presented for the user to choose.

Notes

Missing data can indicate unavailable collection, retention expiry, or an unmatched source rule; it does not prove that the workload is healthy.

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Huawei Cloud Cce Log Analyzer AI skill do?

Query and analyze Huawei Cloud CCE workload, audit, and control-plane logs. Use when investigating CCE logs, Kubernetes logs, Pod logs, application logs, audit logs, LTS logs, kube-apiserver logs, kube-scheduler logs, log analysis, log collection, 日志查询, 日志分析, 审计日志, 调度器日志.

Why use Huawei Cloud Cce Log Analyzer on TypingMind?

Because you install it once and use it with any model. Huawei Cloud Cce Log Analyzer is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Huawei Cloud Cce Log Analyzer in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/huaweicloud/huaweicloud-skills/tree/master/skills/container/cce/huawei-cloud-cce-log-analyzer. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Huawei Cloud Cce Log Analyzer?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Huawei Cloud Cce Log Analyzer?

As many as you like. As long as a model supports skills, you can use Huawei Cloud Cce Log Analyzer with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Huawei Cloud Cce Log Analyzer AI skill free?

Yes. It is published on GitHub by huaweicloud under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇