Huawei Cloud Cce Ops Report Generator

Other

Use when generating consolidated CCE operations reports that combine daily inspection, capacity trend, availability risk, cost optimization, and on-call context into weekly, monthly, SLA, capacity, or stability reports with Markdown and HTML output. Trigger: user mentions "ops report", "运维报告", "report generation", "报告生成", "cluster report", "集群报告", "weekly report", "月度报告", "SLA report", "capacity report", "stability report", "operations summary", "运营总结", "consolidated report", "综合报告", "CCE reporting", "oncall report", "值班报告"

Install

openclaw skills install huawei-cloud-cce-ops-report-generator

Huawei Cloud CCE Ops Report Generator

⚠️ Execution Method (Must Read): This skill executes queries via the local Python dispatcher script. Using hcloud, openstack, or other CLI tools or direct API calls is prohibited.

  • The dispatcher script is located at scripts/huawei-cloud.py within the skill directory
  • All scripts and environment check scripts are inside the skill package. You must use skill action=exec to execute them. Do not run them directly in a shell.
  • Do not attempt hcloud, openstack, curl IAM, or any other CLI/API methods. This skill does not depend on those tools.
  • All paths are relative to the skill directory, which is the directory where this SKILL.md is located.

Overview

This skill generates consolidated operations reports for Huawei Cloud CCE clusters. It aggregates outputs from daily inspection, capacity trend forecasting, availability risk scanning, cost optimization analysis, and optional on-call context into structured reports (weekly, monthly, SLA, capacity, stability). Default behavior is read-only analysis and report generation.

Architecture: Python dispatcher (scripts/huawei-cloud.py) → huawei_generate_ops_report → aggregates from huawei-cloud-cce-daily-cluster-inspector, huawei-cloud-cce-capacity-trend-forecaster, huawei-cloud-cce-availability-risk-scanner, huawei-cloud-cce-cost-optimization-advisor, on-call context → Markdown + HTML + JSON reports

Related Skills

SkillPurpose
huawei-cloud-cce-daily-cluster-inspectorDaily health inspection and risk summarization
huawei-cloud-cce-capacity-trend-forecasterCapacity trend analysis, bottleneck forecasting, HPA simulation
huawei-cloud-cce-availability-risk-scannerAvailability risk scanning (single replicas, PDB, AZ distribution)
huawei-cloud-cce-cost-optimization-advisorCost optimization analysis (idle resources, oversized requests)
huawei-cloud-cce-auto-remediation-runnerExecute remediation actions when user authorizes

Capabilities

  1. One-shot consolidated ops report generation (huawei_generate_ops_report)
  2. Five report types: weekly, monthly, sla, capacity, stability
  3. Aggregated summaries from inspection, capacity, availability, cost, and on-call sources
  4. Prioritized cross-source recommendations with risk levels
  5. Markdown and HTML output with trend charts when capacity data is available
  6. Optional raw payload traceability (include_raw=true)
  7. Graceful degradation: reports continue even if individual sources fail, marking data gaps clearly

Typical Use Cases

  • "Generate a weekly ops report for my CCE cluster"
  • "Create a monthly operations summary with capacity and availability findings"
  • "Produce an SLA report combining inspection and on-call data"
  • "Consolidate capacity trends and cost optimization into a stability report"
  • "Generate a report with on-call context from last week's incidents"
  • "Export a consolidated ops report in HTML with charts"

Prerequisites

Python Dependencies

The dispatcher script requires Python >= 3.6 and the following packages:

  • huaweicloudsdkcore
  • huaweicloudsdkcce
  • huaweicloudsdkaom
  • huaweicloudsdkhss
  • huaweicloudsdkvpc
  • huaweicloudsdkecs
  • huaweicloudsdkces
  • huaweicloudsdkevs
  • huaweicloudsdkeip
  • huaweicloudsdkelb
  • huaweicloudsdkiam
  • kubernetes
  • matplotlib
  • numpy

Install: pip3 install huaweicloudsdkcore huaweicloudsdkcce huaweicloudsdkaom huaweicloudsdkhss huaweicloudsdkvpc huaweicloudsdkecs huaweicloudsdkces huaweicloudsdkevs huaweicloudsdkeip huaweicloudsdkelb huaweicloudsdkiam kubernetes matplotlib numpy

Credential Configuration

VariableRequiredDescription
HUAWEI_AKYesHuawei Cloud Access Key
HUAWEI_SKYesHuawei Cloud Secret Key
HUAWEI_REGIONNoDefault region (overrides region param if set)
HUAWEI_PROJECT_IDNoProject ID (auto-obtained via IAM API when not set)
HUAWEI_SECURITY_TOKENNoRequired when using temporary AK/SK

🚫 Never expose or log AK/SK values. Credentials exist only in the current request call stack and are released after each invocation. Do not write credentials to files, logs, or responses.

Use environment variables HUAWEI_AK / HUAWEI_SK for authentication. The dispatcher reads them automatically.

IAM Permission Requirements

This skill aggregates data from multiple sub-skills. It requires all permissions needed by:

Sub-SkillRequired Permissions
huawei-cloud-cce-daily-cluster-inspectorCCE cluster/node/workload/event read, AOM alarm read
huawei-cloud-cce-capacity-trend-forecasterCCE cluster/node/nodepool/Deployment/HPA read, AOM metrics read
huawei-cloud-cce-availability-risk-scannerCCE cluster/node/workload/PDB/Service/Ingress read, AOM metrics read
huawei-cloud-cce-cost-optimization-advisorCCE cluster/node/nodepool/Deployment/HPA/Pod read, AOM metrics read

Core Commands

All actions are invoked via the dispatcher script:

python3 scripts/huawei-cloud.py <action> region=<region> cluster_id=<cluster_id> [key=value ...]

1. Primary Action: Generate Ops Report

The primary action aggregates all sub-skill outputs into a consolidated report:

python3 scripts/huawei-cloud.py huawei_generate_ops_report \
  region=cn-north-4 cluster_id=<cluster_id> \
  report_type=weekly \
  output_dir=./output

Returns: consolidated summary, cross-source recommendations, data gaps, and output files (Markdown, HTML, JSON, optional SVG charts).

2. Supporting Context Actions

For follow-up deep dives after report generation:

ActionSource SkillDescription
huawei_cce_auto_inspectionhuawei-cloud-cce-daily-cluster-inspectorFull daily health inspection
huawei_analyze_cce_capacity_trendhuawei-cloud-cce-capacity-trend-forecasterCapacity trend analysis with simulation
huawei_scan_cce_availability_riskhuawei-cloud-cce-availability-risk-scannerAvailability risk scan with remediation plan
huawei_analyze_cce_cost_optimizationhuawei-cloud-cce-cost-optimization-advisorCost optimization analysis

Parameter Reference

huawei_generate_ops_report (Primary Action)

ParameterRequiredDefaultDescription
regionYes-Huawei Cloud region (e.g., cn-north-4)
cluster_idYes-CCE cluster ID
report_typeNoweeklyReport type: weekly, monthly, sla, capacity, stability
hoursNoAuto (by type)Analysis window in hours (overrides default for report type)
short_hoursNo24Short-period lookback for cost analysis
long_hoursNo168Long-period lookback for cost analysis
exclude_namespacesNokube-systemComma-separated namespaces excluded from business analysis
business_namespacesNo-Comma-separated namespace allowlist for business Deployments
gateway_keywordsNonginx,gateway,ingress,proxy,kong,apisix,traefikKeywords for identifying gateway-class workloads
output_dirNo-Directory to persist Markdown, HTML, JSON reports and charts
include_rawNofalseInclude raw source payloads for traceability
oncall_report_pathNo-Path to on-call report file for incident context
oncall_summaryNo-Inline on-call summary text for incident context

Default Hours by Report Type

Report TypeDefault Hours
weekly168
monthly744
sla168
capacity168
stability168

Common Region IDs

Region NameRegion ID
North China - Beijing 4cn-north-4
North China - Beijing 1cn-north-1
East China - Shanghai 1cn-east-3
East China - Shanghai 2cn-east-2
South China - Guangzhoucn-south-1
South China - Shenzhencn-south-4
Southwest China - Guiyang 1cn-southwest-2
Asia Pacific - Bangkokap-southeast-2
Asia Pacific - Singaporeap-southeast-1
Asia Pacific - Hong Kongap-southeast-3
Europe - Pariseu-west-0

Output Format

See references/output-schema.md for the complete JSON response schema.

Output Files

When output_dir is specified, the following files are generated:

FileDescription
ops-<type>-summary.jsonFull structured JSON output with summaries, recommendations, and sources
ops-<type>-report.mdMarkdown report with cross-source analysis and recommendations
ops-<type>-report.htmlHTML report with embedded SVG trend charts
ops-capacity-trend.svgCapacity trend curve chart (when capacity data available)
ops-capacity-simulation.svgCapacity simulation chart (when simulation data available)
ops-<type>-raw.jsonRaw source payloads (when include_raw=true)

Key Output Fields

FieldDescription
scopeReport scope: region, cluster_id, excluded namespaces, gateway keywords
reportReport metadata: type, hours, short_hours, long_hours
summary.daily_cluster_inspectorHealth status and anomaly count
summary.capacity_trend_forecasterCPU/memory averages, trend direction, simulation status
summary.availability_risk_scannerRisk level and issue count
summary.cost_optimization_advisorUnderutilized nodes and oversized requests count
summary.oncall_copilotOn-call context status, source, and summary
recommendationsPrioritized cross-source recommendation list with source and risk level
data_gapsList of sources that failed or had missing data
sourcesPer-source success status and file paths
filesOutput file paths for all generated artifacts

Workflow

  1. Collect region, cluster_id, report type, time window, namespace scope, and output directory from user
  2. Execute huawei_generate_ops_report — it aggregates from all five sources internally
  3. Review generated Markdown report first, then HTML report for charts and visualization
  4. For high-risk findings, trace back to source sections:
    • Daily anomalies → huawei-cloud-cce-daily-cluster-inspector
    • Risk level and issue categories → huawei-cloud-cce-availability-risk-scanner
    • Oversized requests / low utilization → huawei-cloud-cce-cost-optimization-advisor
    • Trend slope / bottleneck projection → huawei-cloud-cce-capacity-trend-forecaster
  5. If customer asks for remediation, switch to explicit change workflow and require authorization — hand off to huawei-cloud-cce-auto-remediation-runner

Data Gap Handling

  • If a source report fails, the aggregate report continues and marks that source as degraded
  • If on-call input is missing, mark as a context gap instead of failing the report
  • Preserve source file pointers and optional raw payloads (include_raw=true) for auditability

Verification

  1. Run a weekly report with a known cluster:
    python3 scripts/huawei-cloud.py huawei_generate_ops_report \
      region=cn-north-4 cluster_id=<cluster-id> \
      report_type=weekly output_dir=./output
    
  2. Verify success=true and all four source summaries are present
  3. Check that recommendations lists cross-source items with [source][risk_level] prefixes
  4. Verify data_gaps is empty when all sources succeed
  5. Confirm ops-weekly-report.md and ops-weekly-report.html are generated in output_dir
  6. Test with include_raw=true and verify ops-weekly-raw.json contains source payloads
  7. Test with oncall_summary="Test incident" and verify on-call context appears in summary

Best Practices

  1. Always use huawei_generate_ops_report as the primary action; it aggregates all sources in one call
  2. Choose report type matching the reporting cycle: weekly for weekly reviews, monthly for monthly summaries, sla for SLA tracking, capacity for capacity planning, stability for stability assessment
  3. Use output_dir to persist reports for audit and stakeholder review
  4. For traceability, use include_raw=true to preserve source payloads
  5. If on-call context is available, pass it via oncall_report_path or oncall_summary to enrich the report
  6. For high-risk findings, trace back to the relevant sub-skill for detailed remediation plans
  7. Do NOT execute write actions (HPA apply, scale, node pool resize, workload mutation) unless the user explicitly authorizes remediation — hand off to huawei-cloud-cce-auto-remediation-runner

Reference Documents

DocumentDescription
references/workflow.mdDetailed execution process, scope validation, and data gap handling
references/output-schema.mdComplete JSON response schema for report output

Notes

  • Read-only by design — this skill does NOT modify workloads, HPA, node pools, or cluster configuration
  • Remediation hand-off — all mutation suggestions are handed off to huawei-cloud-cce-auto-remediation-runner with user authorization
  • Never expose or log AK/SK or environment variable values
  • All actions are executed via python3 scripts/huawei-cloud.py <action>; do not use hcloud CLI or direct API calls
  • Data gaps — the report continues generation even when individual sources fail; gaps are clearly marked
  • On-call optional — when on-call context is unavailable, the report still generates with a marked context gap

Common Pitfalls

PitfallCorrect Approach
Assuming report fails when one source failsThe report continues with degraded sources; data gaps are explicitly listed
Skipping on-call context entirely when unavailableMark as a context gap; the report still provides value from other sources
Executing remediation directly from report findingsAll remediation requires explicit user authorization; hand off to huawei-cloud-cce-auto-remediation-runner
Not using output_dir for persistent reportsAlways specify output_dir for audit traceability and stakeholder access
Treating recommendations as action items without risk contextEach recommendation includes [source][risk_level] prefix; prioritize by risk level
Ignoring include_raw for compliance requirementsUse include_raw=true when audit traceability of source data is required
Using wrong report_type for the reporting cycleMatch report type to cycle: weekly=168h, monthly=744h, sla/capacity/stability=168h by default