diff --git a/CHANGES.md b/CHANGES.md index a401f8a..3e7a3a8 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -18,6 +18,7 @@ Release Notes. * Add the sub-command `profiling pprof` for pprof query API by @JophieQu in https://github.com/apache/skywalking-cli/pull/226 * Add the `admin` command group for the OAP admin-server REST host (default port `17128`), with a new global `--admin-url` flag (derived from `--base-url` when unset). Covers every admin feature module: `admin preflight`; `admin cluster nodes`, `admin config dump|ttl`, `admin alarm rules|rule` (status); `admin inspect metrics|entities` (inspect); `admin ui-template list|get|create|update|disable` (ui-management); `admin runtime-rule list|bundled|get|add|inactivate|delete|dump` (runtime-rule); and `admin dsl-debug status|sessions|session start|get|stop` plus `admin oal files|file|rules|rule` (dsl-debugging). * Add the sub-command `admin inspect values` to read the VALUES of metric(s) an OAP does not define locally (foreign metrics) by supplying their `{valueColumn, valueType}` metadata, via the new `POST /inspect/values` admin API; returns the native MQE result. +* Document the `meter-analyzer-config` catalog in `admin runtime-rule` and `admin dsl-debug session start`, matching the OAP-side support for native meter rule hot-update and MAL DSL debugging. ### Bug Fixes diff --git a/internal/commands/admin/dsldebug/dsldebug.go b/internal/commands/admin/dsldebug/dsldebug.go index 2d04953..e8e0a98 100644 --- a/internal/commands/admin/dsldebug/dsldebug.go +++ b/internal/commands/admin/dsldebug/dsldebug.go @@ -86,7 +86,7 @@ $ swctl admin dsl-debug session start --catalog otel-rules --name vm --rule-name Flags: []cli.Flag{ &cli.StringFlag{ Name: "catalog", - Usage: "session `catalog`: otel-rules / log-mal-rules / telegraf-rules / lal / oal", + Usage: "session `catalog`: otel-rules / log-mal-rules / telegraf-rules / meter-analyzer-config / lal / oal", Required: true, }, &cli.StringFlag{ diff --git a/internal/commands/admin/runtimerule/runtimerule.go b/internal/commands/admin/runtimerule/runtimerule.go index fc93803..f56aa8a 100644 --- a/internal/commands/admin/runtimerule/runtimerule.go +++ b/internal/commands/admin/runtimerule/runtimerule.go @@ -36,7 +36,7 @@ var Command = &cli.Command{ UsageText: `Add, override, inactivate and delete MAL / LAL rule files at runtime without restarting OAP, and inspect the live and bundled rule state. -Catalogs: otel-rules, log-mal-rules, telegraf-rules, lal.`, +Catalogs: otel-rules, log-mal-rules, telegraf-rules, meter-analyzer-config, lal.`, Subcommands: []*cli.Command{ listCommand, bundledCommand, @@ -51,7 +51,7 @@ Catalogs: otel-rules, log-mal-rules, telegraf-rules, lal.`, func catalogFlag(required bool) cli.Flag { return &cli.StringFlag{ Name: "catalog", - Usage: "rule `catalog`: otel-rules / log-mal-rules / telegraf-rules / lal", + Usage: "rule `catalog`: otel-rules / log-mal-rules / telegraf-rules / meter-analyzer-config / lal", Required: required, } } diff --git a/pkg/admin/dsldebug/dsldebug.go b/pkg/admin/dsldebug/dsldebug.go index a87fb52..ebd2708 100644 --- a/pkg/admin/dsldebug/dsldebug.go +++ b/pkg/admin/dsldebug/dsldebug.go @@ -36,9 +36,6 @@ const ( MaxRetentionMillis = 60 * 60 * 1000 ) -// Catalogs accepted by a debug session. -var Catalogs = []string{"otel-rules", "log-mal-rules", "telegraf-rules", "lal", "oal"} - // StartArgs holds the inputs of POST /dsl-debugging/session. Catalog, Name, RuleName // and ClientID are mandatory query params; RecordCap / RetentionMillis are optional and // sent as a JSON body only when set. Granularity (LAL only) is sent as a query param. diff --git a/pkg/admin/runtimerule/runtimerule.go b/pkg/admin/runtimerule/runtimerule.go index c98b236..9b9fc55 100644 --- a/pkg/admin/runtimerule/runtimerule.go +++ b/pkg/admin/runtimerule/runtimerule.go @@ -31,9 +31,6 @@ import ( "github.com/apache/skywalking-cli/pkg/admin/client" ) -// Catalogs accepted by the runtime-rule endpoints. -var Catalogs = []string{"otel-rules", "log-mal-rules", "telegraf-rules", "lal"} - // ApplyResult is the JSON envelope returned by addOrUpdate / inactivate / delete. type ApplyResult struct { ApplyStatus string `json:"applyStatus"`