bl monitor, bl log, and bl alert query model call monitoring, call logs, traces, and alert rules, and manage monitoring delivery, log delivery, and alert templates.
These commands require console login (bl auth login --console) and use the observability services of the current workspace. Monitoring and log delivery must be activated separately before first use.
Append --help to any command for full parameter details, e.g. bl monitor overview --help. Command details on this page are verified against bl 2.5.1.
Common flags
The following flags are available to all bl monitor, bl log, and bl alert commands and are not repeated in the command sections.
| Parameter | Type | Description |
|---|
--console-region <region> | string | Console gateway region, e.g. cn-beijing, ap-southeast-1 |
--console-site <site> | string | Console site: domestic, international |
--console-switch-agent <uid> | number | Switch agent UID for delegated access |
--workspace-id <id> | string | Workspace ID; can also be set with BAILIAN_WORKSPACE_ID |
--output <format> | string | Output format: text, json |
bl monitor and bl alert history query the last 7 days by default; bl log queries the last hour by default.
--start-time and --end-time override the default time range and accept ISO dates or millisecond timestamps.
- Commands with pagination use
--max-results and --skip; when a pagination token is returned, pass next-token back unchanged.
Monitoring
bl monitor overview
Show aggregated model call statistics, including call volume, success rate, failures, 4xx/5xx, average latency, first-token latency, and stream calls.
Usage
bl monitor overview [--days <days>] [--start-time <time>] [--end-time <time>] [--model <model>] [--api-key-id <id>] [--channel <channel>] [--source <source>]
| Parameter | Type | Required | Description |
|---|
--days <days> | number | no | Days to look back (default: 7) |
--start-time <time> | string | no | Range start; overrides --days |
--end-time <time> | string | no | Range end; default: now |
--model <model> | string | no | Model name(s), comma-separated |
--api-key-id <id> | string | no | API key ID(s), comma-separated |
--channel <channel> | string | no | Call channel(s), comma-separated |
--source <source> | string | no | Call source(s), comma-separated |
Example: Show the last 7 days of call statistics
bl monitor overview --days 7
bl monitor models
List per-model or per-API-key call statistics with server-side sorting and pagination.
Usage
bl monitor models [--days <days>] [--start-time <time>] [--end-time <time>] [--model <model>] [--api-key-id <id>] [--channel <channel>] [--source <source>] [--sort-by <field>] [--order <ASC|DESC>] [--max-results <n>] [--skip <n>] [--next-token <token>]
| Parameter | Type | Required | Description |
|---|
--days <days> | number | no | Days to look back (default: 7) |
--start-time <time> | string | no | Range start; overrides --days |
--end-time <time> | string | no | Range end |
--model <model> | string | no | Model name(s), comma-separated |
--api-key-id <id> | string | no | API key ID(s), comma-separated |
--channel <channel> | string | no | Call channel(s), comma-separated |
--source <source> | string | no | Call source(s), comma-separated |
--sort-by <field> | string | no | Sort field: modelAndWorkspaceId, callCount, callSuccessCount, callFailedCount, callFailedPercent, avgCallDuration, avgFirstTokenDuration (default: callCount) |
--order <ASC|DESC> | string | no | Sort order (default: DESC) |
--max-results <n> | number | no | Rows per page, 1-50 (default: 10) |
--skip <n> | number | no | Rows to skip (default: 0) |
--next-token <token> | string | no | Pagination token from a previous response |
Example: Show the top 3 models by failure count
bl monitor models --days 7 --sort-by callFailedCount --order DESC --max-results 3
bl monitor metrics
Query time-series metrics such as call count, failures, latency percentiles, and token usage.
Usage
bl monitor metrics --metric <name>[,<name>...] [--agg <agg>] [--step <seconds>] [--days <days>] [--start-time <time>] [--end-time <time>] [--model <model>] [--api-key-id <id>] [--channel <channel>] [--source <source>]
| Parameter | Type | Required | Description |
|---|
--metric <name> | string | yes | Metric name(s), comma-separated |
--agg <agg> | string | no | Aggregation: sum, avg, max, min, p50, p95, p99, cumsum, cumavg, sum_pm (default: sum) |
--step <seconds> | number | no | Data point interval: 60, 3600, or 86400 (default: auto by time range) |
--days <days> | number | no | Days to look back (default: 7) |
--start-time <time> | string | no | Range start; overrides --days |
--end-time <time> | string | no | Range end |
--model <model> | string | no | Model name(s), comma-separated |
--api-key-id <id> | string | no | API key ID(s), comma-separated |
--channel <channel> | string | no | Call channel(s), comma-separated |
--source <source> | string | no | Call source(s), comma-separated |
| Metric | Description |
|---|
model_call_count | Call count |
model_call_duration | Call duration |
model_first_token_duration | First-token duration |
model_generation_duration_per_token | Generation duration per token |
model_call_failed_count | Failed calls |
model_call_4xx_count | 4xx calls |
model_call_5xx_count | 5xx calls |
model_call_429_count | 429 calls |
model_call_data_inspection_failed_count | Content inspection failures |
model_total_amount | Total usage |
model_input_amount | Input usage |
model_output_amount | Output usage |
model_usage | Model usage |
model_tps_per_request | TPS per request |
model_cache_hit_percent | Cache hit rate |
model_ptu_token_quota | PTU token quota |
model_ptu_usage_quota | PTU used quota |
model_ptu_total_tokens | PTU total tokens |
model_ptu_quota | PTU quota |
model_ptu_utilization | PTU utilization |
Example: Query call count and failures for the last hour
bl monitor metrics --metric model_call_count,model_call_failed_count --days 1 --step 3600
- Monitoring statistics count real-time (online) inference calls only.
- When
--start-time is set, it overrides --days.
bl monitor errors
Show the failure breakdown by HTTP status code and error code.
Usage
bl monitor errors [--days <days>] [--start-time <time>] [--end-time <time>] [--model <model>] [--api-key-id <id>] [--channel <channel>] [--source <source>]
| Parameter | Type | Required | Description |
|---|
--days <days> | number | no | Days to look back (default: 7) |
--start-time <time> | string | no | Range start; overrides --days |
--end-time <time> | string | no | Range end |
--model <model> | string | no | Model name(s), comma-separated |
--api-key-id <id> | string | no | API key ID(s), comma-separated |
--channel <channel> | string | no | Call channel(s), comma-separated |
--source <source> | string | no | Call source(s), comma-separated |
Example: Show the last 7 days of failures
bl monitor errors --days 7
- Each row includes
httpStatusCode, errorCode, callCount, and callPercent.
errorCode is null when no server error code is available.
bl monitor delivery status
Show monitoring delivery status: CMS service-linked role, CMS service, Prometheus instance, and the delivery switch.
Usage
bl monitor delivery status
Example: Show monitoring delivery status
bl monitor delivery status
- When not activated, returns
Telemetry.SlrNotExist or cmsSlrAuthorized: false.
- Text output includes the next action to take.
bl monitor delivery enable
Activate monitoring delivery: authorize the CMS service-linked role, activate the CMS service, create a dedicated Prometheus instance, and turn on monitoring delivery for all models.
Usage
bl monitor delivery enable [--no-wait]
| Parameter | Type | Required | Description |
|---|
--no-wait | switch | no | Submit the activation requests and return without waiting for the instance to become ready |
This activates the CMS service and a Prometheus instance, which may incur charges. Review the request with --dry-run before running it.
Example: Activate monitoring delivery
bl monitor delivery enable
- Steps: authorize SLR → activate CMS service (async polling) → create Prometheus instance (async polling) → turn on the delivery switch.
- The server throttles duplicate submissions within 30 seconds.
bl monitor delivery disable
Turn off monitoring delivery for all models.
Usage
bl monitor delivery disable
Example: Preview disabling monitoring delivery
bl monitor delivery disable --dry-run
- Only the delivery switch is turned off; the CMS service and Prometheus instance (with stored data) are kept.
- Run
bl monitor delivery enable to resume delivery.
Logs
bl log status
Show log delivery status, including SLS authorization, audit and inference log services, and switches.
Usage
Example: Show log delivery status
- Audit and inference logs have independent switches; inference logs require the audit log to stay on.
- When not activated, returns
Telemetry.SlrNotExist; run bl log audit enable first.
bl log audit list
Query model audit logs. Audit logs record call metadata, not request or response content.
Usage
bl log audit list [--hours <n>] [--start-time <time>] [--end-time <time>] [--model <model>] [--api-key-id <id>] [--channel <channel>] [--source <source>] [--call-source <Online|Offline>] [--request-id <id>] [--status-code <type>] [--max-results <n>] [--skip <n>] [--next-token <token>]
| Parameter | Type | Required | Description |
|---|
--hours <hours> | number | no | Hours to look back (default: 1) |
--start-time <time> | string | no | Range start; overrides --hours |
--end-time <time> | string | no | Range end |
--model <model> | string | no | Model name(s), comma-separated |
--api-key-id <id> | string | no | API key ID(s), comma-separated |
--channel <channel> | string | no | Call channel(s), comma-separated |
--source <source> | string | no | Call source(s), comma-separated |
--call-source <Online|Offline> | string | no | Inference type: Online, Offline |
--request-id <id> | string | no | Exact model request ID |
--status-code <type> | string | no | Status filter: SUCCESS, CLIENT_ERROR, SERVER_ERROR, CANCEL, comma-separated |
--max-results <n> | number | no | Rows per page (default: 20) |
--skip <n> | number | no | Rows to skip (default: 0) |
--next-token <token> | string | no | Pagination token from a previous response |
Example: Query audit logs for the last hour
bl log audit list --hours 1 --max-results 20
- Audit logs include call time, model, status code, latency, token usage, and request ID.
- Use inference logs for request and response content.
bl log audit get
Show a single audit log entry with its raw record.
Usage
bl log audit get --request-id <id> [--hours <n>] [--start-time <time>] [--end-time <time>] [--model <model>]
| Parameter | Type | Required | Description |
|---|
--request-id <id> | string | yes | Model request ID (from log audit list) |
--hours <hours> | number | no | Hours to look back (default: 1) |
--start-time <time> | string | no | Range start; overrides --hours |
--end-time <time> | string | no | Range end |
--model <model> | string | no | Model name to narrow the search |
Example: Show the audit log for a specific request ID
bl log audit get --request-id 12345678-abcd-1234-abcd-123456789012 --hours 2
bl log audit count
Count audit logs in a time range, useful for estimating exports.
Usage
bl log audit count [--hours <n>] [--start-time <time>] [--end-time <time>] [--model <model>] [--api-key-id <id>]
| Parameter | Type | Required | Description |
|---|
--hours <hours> | number | no | Hours to look back (default: 1) |
--start-time <time> | string | no | Range start; overrides --hours |
--end-time <time> | string | no | Range end |
--model <model> | string | no | Model name(s), comma-separated |
--api-key-id <id> | string | no | API key ID(s), comma-separated |
Example: Count audit logs for the last 24 hours
bl log audit count --hours 24
bl log audit enable
Activate audit log delivery: authorize the SLS service-linked role, initialize the SLS instance, and turn on the audit log switch for all models.
Usage
bl log audit enable [--no-wait]
| Parameter | Type | Required | Description |
|---|
--no-wait | switch | no | Return right after submitting, without waiting for the SLS instance |
This initializes an SLS instance and incurs log storage charges. Review the request with --dry-run before running it.
Example: Activate audit log delivery
- Audit log delivery is required before enabling inference log delivery.
- Audit logs record call metadata only.
bl log audit disable
Disable audit log delivery for all models.
Usage
Example: Preview disabling audit log delivery
bl log audit disable --dry-run
- Rejected while the inference log is still enabled; run
bl log inference disable first.
bl log inference list
Query model inference logs, including request and response content.
Usage
bl log inference list [--hours <n>] [--start-time <time>] [--end-time <time>] [--model <model>] [--api-key-id <id>] [--request-id <id>] [--status-code <type>] [--call-source <Online|Offline>] [--max-results <n>] [--skip <n>]
| Parameter | Type | Required | Description |
|---|
--hours <hours> | number | no | Hours to look back (default: 1) |
--start-time <time> | string | no | Range start; overrides --hours |
--end-time <time> | string | no | Range end |
--model <model> | string | no | Model name; the inference log API accepts a single model |
--api-key-id <id> | string | no | API key ID; the inference log API accepts a single ID |
--request-id <id> | string | no | Exact model request ID |
--status-code <type> | string | no | Status filter: SUCCESS, CLIENT_ERROR, SERVER_ERROR, CANCEL, comma-separated |
--call-source <Online|Offline> | string | no | Inference type: Online, Offline |
--max-results <n> | number | no | Rows per page (default: 20) |
--skip <n> | number | no | Rows to skip (default: 0) |
Example: Query inference logs for the last hour
bl log inference list --hours 1 --max-results 20
- Inference log delivery must be enabled first.
- The list contains summaries; use
log inference get for full request and response content.
bl log inference get
Show the full request and response content of a single inference log entry.
Usage
bl log inference get --request-id <id> [--hours <n>] [--start-time <time>] [--end-time <time>] [--model <model>]
| Parameter | Type | Required | Description |
|---|
--request-id <id> | string | yes | Model request ID (from log inference list) |
--hours <hours> | number | no | Hours to look back (default: 1) |
--start-time <time> | string | no | Range start; overrides --hours |
--end-time <time> | string | no | Range end |
--model <model> | string | no | Model name to narrow the search |
Example: Show the full inference log for a request
bl log inference get --request-id 12345678-abcd-1234-abcd-123456789012 --hours 2
bl log inference count
Count inference logs in a time range.
Usage
bl log inference count [--hours <n>] [--start-time <time>] [--end-time <time>] [--model <model>] [--api-key-id <id>]
| Parameter | Type | Required | Description |
|---|
--hours <hours> | number | no | Hours to look back (default: 1) |
--start-time <time> | string | no | Range start; overrides --hours |
--end-time <time> | string | no | Range end |
--model <model> | string | no | Model name(s), comma-separated |
--api-key-id <id> | string | no | API key ID(s), comma-separated |
Example: Count inference logs for the last 24 hours
bl log inference count --hours 24
- Only calls made while inference log delivery was enabled are counted.
bl log inference enable
Activate inference log delivery: authorize the SLS service-linked role, initialize the SLS instance, and turn on the inference log switch for all models.
Usage
bl log inference enable [--no-wait]
| Parameter | Type | Required | Description |
|---|
--no-wait | switch | no | Return right after submitting, without waiting for the SLS instance |
This initializes an SLS instance and records request and response content, which may incur storage charges. Review the request with --dry-run before running it.
Example: Activate inference log delivery
- Audit log delivery must be enabled first (
bl log audit enable).
bl log inference disable
Disable inference log delivery for all models.
Usage
Example: Preview disabling inference log delivery
bl log inference disable --dry-run
- Only the inference log is disabled; the audit log switch is unchanged.
bl log trace list
List call traces for a model or app.
Usage
bl log trace list --resource-id <id> [--resource-type <model|app>] [--hours <n>] [--start-time <time>] [--end-time <time>] [--max-results <n>] [--skip <n>]
| Parameter | Type | Required | Description |
|---|
--resource-id <id> | string | yes | Model name or app ID to query |
--resource-type <model|app> | string | no | Resource type: model, app (default: model) |
--hours <hours> | number | no | Hours to look back (default: 1) |
--start-time <time> | string | no | Range start; overrides --hours |
--end-time <time> | string | no | Range end |
--max-results <n> | number | no | Rows per page (default: 20) |
--skip <n> | number | no | Rows to skip (default: 0) |
Example: List traces for a specific model
bl log trace list --resource-id qwen3.6-plus --hours 1
bl log trace get
Show the span tree of a single call trace.
Usage
bl log trace get --trace-id <id> [--resource-id <id>] [--hours <n>] [--start-time <time>] [--end-time <time>]
| Parameter | Type | Required | Description |
|---|
--trace-id <id> | string | yes | Trace ID (from log trace list) |
--resource-id <id> | string | no | Model name or app ID to narrow the search |
--hours <hours> | number | no | Hours to look back (default: 1) |
--start-time <time> | string | no | Range start; overrides --hours |
--end-time <time> | string | no | Range end |
Example: Show the span tree for a trace
bl log trace get --trace-id trace_xxx --resource-id qwen3.6-plus
bl log trace stats
Show per-resource trace statistics, including calls, token usage, and latency.
Usage
bl log trace stats [--resource-id <id>] [--resource-type <model|app>] [--hours <n>] [--start-time <time>] [--end-time <time>]
| Parameter | Type | Required | Description |
|---|
--resource-id <id> | string | no | Model name(s) or app ID(s), comma-separated; omit for all |
--resource-type <model|app> | string | no | Resource type: model, app (default: model) |
--hours <hours> | number | no | Hours to look back (default: 1) |
--start-time <time> | string | no | Range start; overrides --hours |
--end-time <time> | string | no | Range end |
Example: Show app trace statistics for the last hour
bl log trace stats --resource-type app --hours 1
- In testing,
--resource-type model returned Not support resourceType model; use --resource-type app for app traces.
Alerts
bl alert metrics
List metrics that alert rules can use and their supported aggregations.
Usage
Example: List available alert metrics
- Requires monitoring delivery to be activated (
bl monitor delivery enable).
- When not activated, returns
The monitoring service is not activated yet.
bl alert template list
List official and custom alert templates; pass --template-id to view one template.
Usage
bl alert template list [--template-id <id>] [--name <name>] [--source <Official|Customize>] [--max-results <n>] [--skip <n>]
| Parameter | Type | Required | Description |
|---|
--template-id <id> | string | no | Exact template ID |
--name <name> | string | no | Fuzzy filter by template name |
--source <Official|Customize> | string | no | Template source: Official, Customize; omit for all |
--max-results <n> | number | no | Rows per page (default: 50) |
--skip <n> | number | no | Rows to skip (default: 0) |
Example: List official alert templates
bl alert template list --source Official
bl alert template create
Create a custom alert template, or copy an existing template with --from.
Usage
bl alert template create --name <name> [--condition <metric:agg:cmp:value:period>...] [--from <template-id>] [--logical-operator <or|and>]
| Parameter | Type | Required | Description |
|---|
--name <name> | string | yes | Template name (max 64 characters) |
--condition <metric:agg:cmp:value:period> | array | no | Alert condition, repeatable 1-10 times |
--from <template-id> | string | no | Copy conditions from an existing template |
--logical-operator <or|and> | string | no | How multiple conditions combine (default: or) |
Example: Create a failure-count alert template
bl alert template create --name failure-count --condition 'model_call_failed_count:sum:>:10:60'
- The condition format is
metric:aggregation:comparison:threshold:period, e.g. model_call_failed_count:sum:>:10:60.
- When a condition contains
> or <, quote the entire condition so the shell does not treat it as redirection.
- Use
bl alert metrics to list metric names.
bl alert template update
Update a custom alert template, replacing the complete condition list.
Usage
bl alert template update --template-id <id> --name <name> --condition <metric:agg:cmp:value:period>... [--logical-operator <or|and>]
| Parameter | Type | Required | Description |
|---|
--template-id <id> | string | yes | Template ID |
--name <name> | string | yes | Template name (max 64 characters) |
--condition <metric:agg:cmp:value:period> | array | yes | Alert condition, repeatable 1-10 times |
--logical-operator <or|and> | string | no | How multiple conditions combine (default: or) |
Example: Raise the failure threshold
bl alert template update --template-id 123 --name failure-count --condition 'model_call_failed_count:sum:>:20:60'
bl alert template delete
Delete custom alert templates. Official templates cannot be deleted.
Usage
bl alert template delete --template-id <id>[,<id>...]
| Parameter | Type | Required | Description |
|---|
--template-id <id> | string | yes | Template ID(s), comma-separated |
--yes | switch | no | Confirm this high-risk operation |
This permanently deletes the alert templates and cannot be undone.
Example: Preview deleting an alert template
bl alert template delete --template-id 123 --dry-run
bl alert list
List model alert rules.
Usage
bl alert list [--rule-id <id>] [--name <name>] [--enabled <true|false>] [--level <INFO|WARNING|ERROR>] [--max-results <n>] [--skip <n>] [--next-token <token>]
| Parameter | Type | Required | Description |
|---|
--rule-id <id> | string | no | Exact rule ID |
--name <name> | string | no | Fuzzy filter by rule name |
--enabled <true|false> | string | no | Filter by enabled state |
--level <INFO|WARNING|ERROR> | string | no | Filter by alert level |
--max-results <n> | number | no | Rows per page (default: 20) |
--skip <n> | number | no | Rows to skip (default: 0) |
--next-token <token> | string | no | Pagination token from a previous response |
Example: List enabled alert rules
bl alert list --enabled true
bl alert create
Create a model alert rule from an alert template.
Usage
bl alert create --name <name> --template-id <id> --model <model> [--message <text>] [--level <INFO|WARNING|ERROR>] [--interval <seconds>] [--duration <seconds>] [--contact <id>] [--contact-group <id>] [--notify-window <HH:mm-HH:mm>] [--notify-days <days>] [--silence <seconds>] [--gmt-offset <offset>]
| Parameter | Type | Required | Description |
|---|
--name <name> | string | yes | Alert rule name (max 64 characters) |
--template-id <id> | string | yes | Alert template ID (from alert template list) |
--model <model> | string | yes | Model name(s) to alert on, comma-separated |
--message <text> | string | no | Alert notification content (Go template); defaults to the console template |
--level <INFO|WARNING|ERROR> | string | no | Alert level (default: INFO) |
--interval <seconds> | number | no | Check interval (default: 60) |
--duration <seconds> | number | no | How long the condition must hold; 0 = immediately (default: 60) |
--contact <id> | string | no | CloudMonitor contact ID(s), comma-separated |
--contact-group <id> | string | no | CloudMonitor contact group ID(s), comma-separated |
--notify-window <HH:mm-HH:mm> | string | no | Daily notification window (default: 00:00-23:59) |
--notify-days <days> | string | no | Days of week, 1-7, comma-separated (default: every day) |
--silence <seconds> | number | no | Silence period between repeat notifications (default: never repeat) |
--gmt-offset <offset> | string | no | Timezone offset for the notify window (default: +0800) |
Example: Create a failure-count alert for a model
bl alert create --name high-failure-rate --template-id 123 --model qwen3.6-plus
- Alert conditions come from the template; choose one with
alert template list.
- Create contacts and contact groups in the CloudMonitor console, then pass their IDs.
- Use
--dry-run to inspect the request body before creating.
bl alert update
Update a model alert rule, replacing all fields.
Usage
bl alert update --rule-id <id> --name <name> --template-id <id> --model <model> [--message <text>] [--level <INFO|WARNING|ERROR>] [--interval <seconds>] [--duration <seconds>] [--contact <id>] [--contact-group <id>] [--notify-window <HH:mm-HH:mm>] [--notify-days <days>] [--silence <seconds>] [--gmt-offset <offset>]
| Parameter | Type | Required | Description |
|---|
--rule-id <id> | string | yes | Alert rule ID (from alert list) |
--name <name> | string | yes | Alert rule name |
--template-id <id> | string | yes | Alert template ID |
--model <model> | string | yes | Model name(s) to alert on, comma-separated |
--message <text> | string | no | Alert notification content (Go template) |
--level <INFO|WARNING|ERROR> | string | no | Alert level (default: INFO) |
--interval <seconds> | number | no | Check interval (default: 60) |
--duration <seconds> | number | no | How long the condition must hold (default: 60) |
--contact <id> | string | no | Contact ID(s), comma-separated |
--contact-group <id> | string | no | Contact group ID(s), comma-separated |
--notify-window <HH:mm-HH:mm> | string | no | Daily notification window |
--notify-days <days> | string | no | Days of week, 1-7 |
--silence <seconds> | number | no | Silence period between repeat notifications |
--gmt-offset <offset> | string | no | Timezone offset for the notify window |
Example: Change the alert level
bl alert update --rule-id 789 --name high-failure-rate --template-id 123 --model qwen3.6-plus --level WARNING
bl alert delete
Delete model alert rules.
Usage
bl alert delete --rule-id <id>[,<id>...]
| Parameter | Type | Required | Description |
|---|
--rule-id <id> | string | yes | Rule ID(s), comma-separated |
--yes | switch | no | Confirm this high-risk operation |
This permanently deletes the alert rules and cannot be undone.
Example: Preview deleting an alert rule
bl alert delete --rule-id 789 --dry-run
bl alert enable
Enable a model alert rule.
Usage
bl alert enable --rule-id <id>
| Parameter | Type | Required | Description |
|---|
--rule-id <id> | string | yes | Alert rule ID |
Example: Enable an alert rule
bl alert enable --rule-id 789
bl alert disable
Disable a model alert rule. The rule is kept but notifications stop.
Usage
bl alert disable --rule-id <id>
| Parameter | Type | Required | Description |
|---|
--rule-id <id> | string | yes | Alert rule ID |
Example: Disable an alert rule
bl alert disable --rule-id 789
bl alert history
List model alert history, including firing and recovered events.
Usage
bl alert history [--days <days>] [--start-time <time>] [--end-time <time>] [--rule-id <id>] [--status <ALARM|OK>] [--level <INFO|WARNING|ERROR>] [--max-results <n>] [--skip <n>] [--next-token <token>]
| Parameter | Type | Required | Description |
|---|
--days <days> | number | no | Days to look back (default: 7) |
--start-time <time> | string | no | Range start; overrides --days |
--end-time <time> | string | no | Range end |
--rule-id <id> | string | no | Filter by alert rule ID |
--status <ALARM|OK> | string | no | Alert state: ALARM (firing), OK (recovered) |
--level <INFO|WARNING|ERROR> | string | no | Filter by highest alert level |
--max-results <n> | number | no | Rows per page, 1-50 (default: 10) |
--skip <n> | number | no | Rows to skip (default: 0) |
--next-token <token> | string | no | Pagination token from a previous response |
Example: Show alerts that fired in the last 7 days
bl alert history --days 7 --status ALARM