SLS Dashboards
Design dashboards around the user's questions and verified SLS data. Resolve script paths relative to this file.
Prerequisites
Explanation, offline construction and validation do not require CLI setup or cloud
credentials. Offline scripts still need the Python dependencies.
Before the first build or cloud operation, run python3 scripts/doctor.py with
the Python interpreter that will run the task. It checks Python dependencies,
Aliyun CLI 3.3.22 or later, CLI profile configuration, the SLS plugin, and
dashboard/query command help, and prints versions and suggested commands. Use --offline for offline work;
add --with-sdk for Metric StoreView queries or scheduled reports. See
environment setup for details.
For cloud operations, use the configured profile by default; add --profile when
the user specifies one. The caller needs the
RAM permissions for the operation.
Observability (required for cloud operations)
Before the first cloud call, read manifest.json and use
its non-empty version as {skill-version}. Stop if the file or version is invalid;
do not guess a version.
Generate one random 32-character lowercase hexadecimal {session-id} for this skill
in the conversation. Reuse it for all operations, pagination and retries. When
switching skills, use each skill's own version and session ID, including on return.
Set ALIBABACLOUD_SLS_DASHBOARD_USERAGENT to:
AlibabaCloud-Agent-Skills/alibabacloud-sls-dashboard/{session-id} skill-version/{skill-version}
The bundled scripts use this variable for cloud requests. For direct cloud API commands, including request-only dry runs, add:
--user-agent "$ALIBABACLOUD_SLS_DASHBOARD_USERAGENT"
Local help, version, plugin and configure commands, offline dashboard operations, and doctor checks do not need it. Never send literal placeholders, credentials or personal identifiers.
Choose a workflow
| Request | Read | | --- | --- | | Explain settings or review JSON/Plan | Consult | | Create a dashboard or build a supplied Plan | Create | | Edit, add, remove charts, or combine changes | Edit | | Publish or delete a dashboard | Publish | | Diagnose missing data or broken controls | Diagnose | | Manage scheduled reports | Subscriptions |
Use the knowledge index to select references. Explain each setting's purpose and effect. Include commands or configuration fields when needed to complete the task; omit implementation details.
For a simple starting configuration, read common chart examples and open the selected single-chart grid Dashboard JSON. Follow its links for detailed settings.
For CLI or script failures, use skill usage troubleshooting.
Working guidelines
- Plan builds and online operations support SLS Logstore, Metricstore and existing named StoreViews. The capability table lists tool support and other Dashboard JSON sources, including builtin simulated data.
- Keep the destination Project/Region independent of query sources. Preserve StoreView identity instead of replacing a view with a member store.
- Use resource names, fields, metrics and labels from user input, existing configuration or discovery. A sampled field does not prove SQL indexing.
- Prefer a Plan for new content. Complete Dashboard JSON can be validated directly. Edit existing JSON without regenerating unrelated content. Use lowercase stable IDs for new charts; see chart naming.
- Use
gridfor new dashboards; usefreeonly when a custom layout is needed. Setattribute.typeexplicitly. Validation accepts empty existing layout settings asfree; see layout. - Display-only edits need no datasource discovery. Field changes must account for query results, transformations and display bindings. Controls need matching consumers.
- Keep an original baseline for edits and review the diff before publishing.
- Build and validation are offline. Publish/delete require user authorization
and
--execute; an explicit request to publish authorizes publishing. Creating a dashboard does not authorize report deliveries. - Report the checks performed. Saving successfully does not prove that queries or charts render correctly.
Run the tools
Use Python 3.10+ with the Python dependencies installed. Metric StoreView queries and scheduled reports also need the optional packages in that guide. Offline work needs no cloud credentials.
python3 scripts/sls.py --help: resources, discovery, queries and dashboard reads.python3 scripts/dashboard.py --help: build, edit checks, publishing and subscriptions.python3 scripts/validator.py --help: individual chart or dashboard configuration checks.
Cloud commands accept --profile and --endpoint after the operation name;
--region remains required. See commands and connection options.
Scan to join WeChat group