Logo Huawei Cloud Agentarts Obs Diagnosis

Huawei Cloud Agentarts Obs Diagnosis

Tổ chức
huaweicloud
huawei-cloud-agentarts-obs-diagnosis

Observability no-data diagnosis skill for Huawei Cloud AgentArts agent-ops platform. Systematically diagnoses missing metrics, logs, and traces/sessions in agent-ops by checking subscription metadata, data pipeline (APM/AOM/LTS), query parameters, and authentication. Generates root-cause analysis and fix recommendations. Triggers include: "AgentArts no data", "metrics no data", "logs no data", "traces no data", "session no data", "obs diagnosis", "可观测诊断", "无数据诊断", "查不到指标", "查不到日志", "调用链无数据", "agent-ops 无数据"

Add to TypingMind

Tổng quan

Nhà phát hànhhuaweicloud
Kho mãhuaweicloud-skills
Tên kỹ nănghuawei-cloud-agentarts-obs-diagnosis
Sao
59
Bản fork
24
Tệp đi kèm
7
Giấy phépMIT
Liên kết
  • Hướng dẫn bằng Markdown

    Tệp SKILL.md được mô hình tải khi cần, nên chỉ tốn token khi có yêu cầu thực sự phù hợp.

  • Dùng được với mọi LLM

    Kỹ năng AI dùng hướng dẫn viết bằng Markdown thay vì mã dành riêng cho một nhà cung cấp, nên dùng được với GPT, Claude, Gemini, Grok hoặc mô hình cục bộ.

  • 7 tệp đi kèm

    Các tập lệnh, mẫu và tài liệu tham khảo mà mô hình có thể đọc khi làm việc. Các tệp chỉ cho phép đọc và không bao giờ được thực thi.

  • Mã nguồn mở

    Được huaweicloud công bố trên GitHub. Hãy đọc các tệp nguồn trước khi cài đặt.

Cài đặt

Cài đặt kỹ năng AI Huawei Cloud Agentarts Obs Diagnosis trong TypingMind để dùng với bất kỳ LLM nào, hoặc thêm vào một tác nhân AI khác có thể đọc SKILL.md.

1

Cài đặt trong TypingMind

TypingMind cài đặt kỹ năng trực tiếp từ thư mục GitHub — đọc SKILL.md, đóng gói các tệp tài nguyên và lưu kết quả trên máy.

  1. Mở ứng dụng và vào Plugin → Kỹ năng.
  2. Chọn "Cài đặt từ GitHub".
  3. Dán URL của thư mục kỹ năng được hiển thị bên dưới rồi xác nhận.
    https://github.com/huaweicloud/huaweicloud-skills/tree/master/skills/ai/agentarts/huawei-cloud-agentarts-obs-diagnosis
  4. Bật kỹ năng trong từng cuộc trò chuyện mà bạn muốn sử dụng kỹ năng đó.
Plugin → Kỹ năng → Thêm kỹ năng → Từ URL GitHub, sau đó dán URL thư mục và nhấn Tiếp tục.
2

Cài đặt trong tác nhân AI khác

Bất kỳ tác nhân AI nào đọc được định dạng Agent Skills đều có thể dùng kỹ năng này — hãy sao chép thư mục vào thư mục kỹ năng của tác nhân AI đó.

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/ai/agentarts/huawei-cloud-agentarts-obs-diagnosis .claude/skills/huawei-cloud-agentarts-obs-diagnosis
Khởi động lại Claude Code sau khi sao chép để ứng dụng nhận kỹ năng mới.

Sử dụng trong TypingMind

Bật Huawei Cloud Agentarts Obs Diagnosis trong bất kỳ cuộc trò chuyện nào trên TypingMind, mô hình sẽ tự xử lý phần còn lại. Tên và mô tả của kỹ năng nằm trong prompt hệ thống. Ngay khi có yêu cầu phù hợp, mô hình tự tải toàn bộ hướng dẫn — bạn không cần gọi thủ công và kỹ năng không tốn token cho đến khi thực sự được dùng.

Mô hình tự nạp Huawei Cloud Agentarts Obs Diagnosis ngay khi có yêu cầu phù hợp.

Dùng được với mọi mô hình AI

Kỹ năng AI là các hướng dẫn Markdown thuần túy, không phải mã dành riêng cho một nhà cung cấp, nên bạn có thể dùng Huawei Cloud Agentarts Obs Diagnosis với cả những mô hình khác ngoài mô hình ban đầu. Chỉ cần cài đặt một lần trong TypingMind rồi dùng với GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama hoặc mô hình cục bộ do bạn tự chạy — tất cả đều dùng khóa API của riêng bạn.

  • Chỉ tải khi cần

    Prompt hệ thống chỉ chứa tên và mô tả. Hướng dẫn được tải khi có yêu cầu phù hợp đầu tiên, nên khi kỹ năng chưa được dùng, bạn không tốn token cho phần hướng dẫn.

  • Đổi mô hình ngay trong cuộc trò chuyện

    Vì kỹ năng là hướng dẫn chứ không phải mã, việc đổi mô hình không làm kỹ năng ngừng hoạt động — mô hình tiếp theo vẫn đọc cùng tệp SKILL.md.

Hướng dẫn của kỹ năng

Đây là nội dung SKILL.md mà mô hình tải. Hãy đọc trước khi cài đặt — kỹ năng là những hướng dẫn mà mô hình của bạn sẽ làm theo.

Huawei Cloud AgentArts Observability No-Data Diagnosis

Overview

This skill systematically diagnoses missing metrics, logs, and traces/sessions in Huawei Cloud AgentArts agent-ops platform. It follows a three-phase diagnostic flow: subscription metadata check → data pipeline troubleshooting → query parameter validation, covering three data sources: APM (traces/metrics), AOM (metrics), and LTS (logs).

Architecture

Application (OTel SDK/Collector)
  │
  ├── Traces:  OTEL SDK → APM (OTLP) → deliverConfig → Kafka → agent-ops
  ├── Metrics: Application → AOM (Prometheus) → agent-ops
  └── Logs:    Application → LTS → agent-ops (requires logGroup/logStream metadata)

Data Sources and Metadata

Data TypeSourceRequired Metadata
Traces/SessionsAPMapmBusiness, apmToken
MetricsAOMpromInstance, aomAccessCode
LogsLTSlogGroup, logStream

Prerequisites

1. Huawei Cloud Credentials

bash
export HUAWEI_ACCESS_KEY="<your-access-key-id>"
read -rs HUAWEI_SECRET_KEY; export HUAWEI_SECRET_KEY
export HUAWEI_REGION="cn-north-4"

2. hcloud CLI (KooCLI)

Install: https://support.huaweicloud.com/qs-hcli/hcli_02_003.html

3. IAM Permissions

See references/iam-policies.md for least-privilege policy.

Workflow

Step 1: Identify Missing Data Type

Use AskUserQuestion to determine which data type is missing:

OptionData TypeData Source
AMetrics (metrics)AOM / APM
BLogs (logs)LTS
CTraces/Sessions (traces/session)APM
DAll missingAll sources

Record symptoms: complete vs partial absence, error codes, onset time.

Step 2: Confirm Environment Context

ParameterDefaultDescription
regioncn-north-4Query region (must match ingestion region)
domain_id—IAM domain ID
project_id—Project ID for LTS queries
start_time / end_time—Millisecond timestamps (13 digits, NOT 10-digit seconds)

Step 3: Check Subscription Metadata (Phase 1 — Always First)

Missing subscription metadata is the most common root cause of no-data issues.

Check APM business and token:

bash
hcloud APM ListBusiness --cli-region=cn-north-4

If no business exists → APM not subscribed. Create business:

bash
hcloud APM CreateBusiness --cli-region=cn-north-4 \
  --name="obs-diagnosis-check" \
  --display_name="obs-diagnosis-check" \
  --descp="diagnosis" \
  --cmdb_datasource_type=OTEL

Verify business token:

bash
hcloud APM ShowToken --cli-region=cn-north-4 \
  --x-business-id={business_id}

Check AOM Prometheus instance and access code:

bash
hcloud AOM ListPromInstance --cli-region=cn-north-4 --Enterprise-Project-Id=0
hcloud AOM ListAccessCode --cli-region=cn-north-4

If no PromInstance → AOM not configured. Create Prometheus instance (--prom_type must be one of ECS/CCE/REMOTE_WRITE/CLOUD_SERVICE/ACROSS_ACCOUNT; --region header is required and must match --cli-region):

bash
hcloud AOM CreatePromInstance --cli-region=cn-north-4 \
  --prom_name="obs-diagnosis" \
  --prom_type=REMOTE_WRITE \
  --region=cn-north-4

Check LTS log groups and streams:

bash
hcloud LTS ListLogGroups --cli-region=cn-north-4
hcloud LTS ListLogStreams --cli-region=cn-north-4 --log_group_id={group_id}

If no logGroup/logStream → LTS not subscribed for agent-ops.

Step 4: Diagnose by Data Type (Phase 2 — Pipeline Check)

4A. Metrics No-Data Diagnosis

Check pipeline bottom-up:

  1. Application side: Is OTEL metrics SDK / Prometheus exporter configured?
  2. AOM side:
    bash
    hcloud AOM ListPromInstance --cli-region=cn-north-4 --Enterprise-Project-Id=0
    hcloud AOM ListAccessCode --cli-region=cn-north-4
    hcloud AOM ListMetadataAomPromGet --cli-region=cn-north-4
    • Prometheus instance valid?
    • Access code valid?
    • Endpoint reachable?
  3. Query side: Use Prometheus query to verify data exists:
    bash
    hcloud AOM ListInstantQueryAomPromGet --cli-region=cn-north-4 \
      --query="up" \
      --prom_instance_id={prom_id}
  4. agent-ops filter: Check metric_name matches (resource_tokens, model_tokens, session_tokens, trace_tokens), filter labels match (gen_ai_resource_type, resource_id, model_id).
4B. Logs No-Data Diagnosis
  1. Application side: Is ICAgent / OTEL logs exporter configured?
  2. LTS side:
    bash
    hcloud LTS ListLogGroups --cli-region=cn-north-4
    hcloud LTS ListLogStreams --cli-region=cn-north-4 --log_group_id={group_id}
    hcloud LTS ListLogs --cli-region=cn-north-4 \
      --log_group_id={group_id} \
      --log_stream_id={stream_id} \
      --start_time=1720000000000 \
      --end_time=1720600000000
  3. Query parameters: Check agentRunId, agentId, traceId, logType, keyword syntax (LTS query language).
  4. Error codes:
    • LTS.2446 → Unsupported query syntax — fix keyword syntax
    • 403 → Permission denied — check agency token (ops_admin_trust)
4C. Traces/Sessions No-Data Diagnosis
  1. Application side:
    bash
    hcloud APM SearchAgent --cli-region=cn-north-4 --x-business-id={business_id}
    Is OTEL SDK configured with correct endpoint and token?
  2. APM deliverConfig:
    • Is deliver_otel_trace=true in deliverConfig?
    • Is Kafka reachable (bootstrap-servers, SASL_SSL, topic exists)?
  3. APM data verification:
    bash
    hcloud APM SearchTransaction --cli-region=cn-north-4 \
      --x-business-id={business_id} \
      --start_time=1720000000000 \
      --end_time=1720600000000
  4. agent-ops query side (API only — not in KooCLI):
    bash
    curl -X POST ${AGENT_OPS_ENDPOINT}/v1/ops/observation/traces \
      -H "Authorization: Bearer ${IAM_TOKEN}" \
      -H "Content-Type: application/json" \
      -d '{"start_time": 1720000000000, "end_time": 1720600000000}'

Step 5: Common Checks (All Data Types)

  1. Timestamp format: Must be 13-digit milliseconds (10-digit seconds → no data)
  2. Region consistency: Ingestion region must match query region
  3. Authentication: IAM token / AppCode valid? 401 → expired, 403 → insufficient permission. ${IAM_TOKEN} 需在运行期由 IAM token / AppCode 获取后替换(见上 Step 4 agent-ops 查询命令);未替换则为占位符,照抄请求必返回 401。
  4. Permission check:
    bash
    hcloud IAM ListPoliciesV5 --cli-region=cn-north-4

Step 6: Generate Diagnostic Report

See references/diagnostic-report-template.md for the report format.

Core Commands

CommandPurposeMode
hcloud APM ListBusiness --cli-region=cn-north-4List APM businessesCLI
hcloud APM ShowBusinessDetail --cli-region=cn-north-4Show business detailsCLI
hcloud APM ShowToken --cli-region=cn-north-4Get business tokenCLI
hcloud APM ShowAccessPoint --cli-region=cn-north-4Get access pointCLI
hcloud APM SearchAgent --cli-region=cn-north-4Search agentsCLI
hcloud APM SearchTransaction --cli-region=cn-north-4Search transactions (traces)CLI
hcloud APM ShowSpanSearch --cli-region=cn-north-4Search spansCLI
hcloud APM ListOpenRegion --cli-region=cn-north-4List open regionsCLI
hcloud AOM ListPromInstance --cli-region=cn-north-4 --Enterprise-Project-Id=0List Prometheus instancesCLI
hcloud AOM ListAccessCode --cli-region=cn-north-4List access codesCLI
hcloud AOM ListInstantQueryAomPromGet --cli-region=cn-north-4Instant Prometheus queryCLI
hcloud AOM ListRangeQueryAomPromGet --cli-region=cn-north-4Range Prometheus queryCLI
hcloud AOM ListMetadataAomPromGet --cli-region=cn-north-4List Prometheus metadataCLI
hcloud LTS ListLogGroups --cli-region=cn-north-4List log groupsCLI
hcloud LTS ListLogStreams --cli-region=cn-north-4List log streamsCLI
hcloud LTS ListLogs --cli-region=cn-north-4List logsCLI
hcloud IAM ListPoliciesV5 --cli-region=cn-north-4List IAM policiesCLI
POST {AGENT_OPS_ENDPOINT}/v1/ops/observation/tracesQuery traces in agent-opsAPI
POST {AGENT_OPS_ENDPOINT}/v1/ops/observation/metrics/trendQuery metric trendsAPI

Parameter Confirmation

ParameterRequiredDescriptionExample
regionYesQuery regioncn-north-4
business_idYes (traces)APM business IDFrom ListBusiness
prom_instance_idYes (metrics)AOM Prometheus instance IDFrom ListPromInstance
log_group_idYes (logs)LTS log group IDFrom ListLogGroups
log_stream_idYes (logs)LTS log stream IDFrom ListLogStreams
start_timeYesStart time (ms timestamp)1720000000000
end_timeYesEnd time (ms timestamp)1720600000000
metric_nameNo (metrics)Metric name to queryresource_tokens
keywordsNo (logs)LTS keyword searcherror AND timeout
trace_idNo (traces)Trace ID filter—

KooCLI Command Format Standard

bash
hcloud <Service> <Operation> --cli-region=<region> [--key=value ...]
FeatureDescriptionExample
Service nameKooCLI Service name (uppercase)APM, AOM, LTS, IAM
Operation namePascalCaseListBusiness, ShowToken
Region parameter--cli-region=<value>--cli-region=cn-north-4
Simple parameter--key=value--business_id=xxx

Reference Documents

  • references/iam-policies.md — Least-privilege IAM policies
  • references/cli-installation-guide.md — hcloud CLI installation guide
  • references/verification-method.md — Verification methods and API status
  • references/dataflow-diagram.md — Mermaid data flow and diagnostic flow
  • references/acceptance-criteria.md — Acceptance criteria for diagnosis
  • references/diagnostic-report-template.md — Diagnostic report template

Edge Cases

ScenarioHandling
All data types missingCheck subscription status first, then network connectivity
Partial data missing (some apps)Check agent deployment, service.name mapping
LTS.2446 errorFix keyword syntax (escaping, quotes, operators)
403 error (non-claw)Check IAM tenant permissions and subscription status
403 error (claw)Check agency (ops_admin_trust) and STS configuration
RESOURCE_NOT_EXISTResource records missing — confirm CreateClawTenantRelation
Metadata missingSubscribe first (SubscribeOpsObservation)
Timestamp 10 digitsConvert to 13-digit milliseconds
Region mismatchUse same region for ingestion and query

Notes

  • Priority order: Subscription metadata → data pipeline → query parameters → permissions
  • Most common root cause: Missing subscription metadata (apmBusiness, promInstance, logGroup)
  • Timestamp pitfall: 10-digit seconds instead of 13-digit milliseconds
  • Credential security: Never hardcode AK/SK. Read from env vars or CLI profile.
  • Least privilege: See references/iam-policies.md for required permissions.

Tệp đi kèm

Khi kỹ năng đã được tải, mô hình có thể đọc các tệp này nếu cần. Các tệp này chỉ dùng để đọc và không bao giờ được thực thi.

Câu hỏi thường gặp

Kỹ năng AI Huawei Cloud Agentarts Obs Diagnosis làm được gì?

Observability no-data diagnosis skill for Huawei Cloud AgentArts agent-ops platform. Systematically diagnoses missing metrics, logs, and traces/sessions in agent-ops by checking subscription metadata, data pipeline (APM/AOM/LTS), query parameters, and authentication. Generates root-cause analysis and fix recommendations. Triggers include: "AgentArts no data", "metrics no data", "logs no data", "traces no data", "session no data", "obs diagnosis", "可观测诊断", "无数据诊断", "查不到指标", "查不到日志", "调用链无数据", "agent-ops 无数据"

Vì sao nên dùng Huawei Cloud Agentarts Obs Diagnosis trên TypingMind?

Vì bạn chỉ cần cài một lần rồi dùng với bất kỳ mô hình nào. Huawei Cloud Agentarts Obs Diagnosis là nội dung Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên cùng một kỹ năng có thể chạy trên GPT-5, Claude, Gemini, Grok hoặc mô hình trên thiết bị — và bạn có thể đổi mô hình ngay trong cuộc trò chuyện mà kỹ năng vẫn hoạt động. TypingMind dùng khóa API riêng của bạn, nên bạn thanh toán trực tiếp cho nhà cung cấp thay vì trả phí thuê bao theo suất người dùng, đồng thời kỹ năng và các cuộc trò chuyện vẫn nằm trong bộ lưu trữ của bạn.

Làm thế nào để cài Huawei Cloud Agentarts Obs Diagnosis trong TypingMind?

Mở Plugin → Kỹ năng → Cài đặt từ GitHub trong TypingMind rồi dán https://github.com/huaweicloud/huaweicloud-skills/tree/master/skills/ai/agentarts/huawei-cloud-agentarts-obs-diagnosis. TypingMind đọc tệp SKILL.md, đóng gói các tệp đi kèm rồi cài đặt cả gói dưới dạng một kỹ năng mà bạn có thể bật cho từng cuộc trò chuyện.

Những mô hình AI nào có thể dùng Huawei Cloud Agentarts Obs Diagnosis?

Bất kỳ mô hình nào bạn kết nối trong TypingMind. Kỹ năng AI là các hướng dẫn bằng Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên GPT, Claude, Gemini, Grok và các mô hình chạy trên thiết bị đều có thể tải kỹ năng này khi có yêu cầu phù hợp.

Có thể dùng Huawei Cloud Agentarts Obs Diagnosis với bao nhiêu mô hình AI?

Bao nhiêu cũng được. Miễn là mô hình hỗ trợ kỹ năng, bạn có thể dùng Huawei Cloud Agentarts Obs Diagnosis với mô hình đó — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama và nhiều mô hình khác — tất cả đều trên TypingMind với khóa API riêng của bạn.

Kỹ năng AI Huawei Cloud Agentarts Obs Diagnosis có miễn phí không?

Có. Kỹ năng này được huaweicloud phát hành trên GitHub theo giấy phép MIT. Bạn chỉ trả tiền cho nhà cung cấp AI của mình theo số token đã dùng.

Kỹ năng AI là gì?

Kỹ năng AI là một gói hướng dẫn có thể tái sử dụng, chỉ cho mô hình AI cách thực hiện một tác vụ cụ thể. Kỹ năng tuân theo định dạng mở Agent Skills: một tệp SKILL.md chứa tên và mô tả, cùng các tập lệnh, mẫu hoặc tệp tham khảo mà mô hình có thể cần. Mô hình chỉ đọc hướng dẫn khi yêu cầu của bạn phù hợp với kỹ năng, nên kỹ năng đã cài đặt không phát sinh chi phí cho đến khi được sử dụng.

Kỹ năng AI khác gì với plugin hoặc máy chủ MCP?

Plugin hoặc máy chủ MCP cung cấp các công cụ mới mà mô hình có thể gọi. Khi mô hình gọi một công cụ, mã của công cụ đó chạy ở đâu đó và trả về kết quả. Còn kỹ năng AI cung cấp kiến thức và quy trình: cách tiếp cận tác vụ, các bước cần thực hiện và những tiêu chí mà kết quả cần đáp ứng. Kỹ năng chỉ là nội dung Markdown, nên không cần máy chủ, khóa API hay môi trường thực thi và hoạt động với mọi mô hình.

Xem tất cả

Tạo ngay không gian làm việc AI riêng

Đăng ký bản tin của chúng tôi để nhận thông báo về tính năng mới và các đợt tặng quà sắp tới 👇