Repository navigation
CLI Monitor
Kind: Write.
Refuses a literal --address, or an inline --cli-input-json value that sets Address, for every Type except Email, SMS, or Telegram, with exit code 2, since another type's address can carry a bearer token. Refuses an inline --cli-input-json value that sets Headers for every Type, since Headers has no flag of its own and a Webhook channel's header value can hold a secret. Pass Address (and Headers) only through --cli-input-json file://channel.json. The write's own Output is redacted the same way a channel read is.
Email, Slack, SMS, and Telegram need an OTP to create or to change Address: run send-channel-otp first, then pass its Ref as --otp-ref and the code read from the address as --otp. A wrong or expired OTP exits with error code OTPRejected and sends no create or update; the validate step, like the create or update itself, is never retried after an ambiguous failure. Webhook needs neither flag.
| Flag | Type | Required |
|---|---|---|
--name |
string |
yes |
--type |
string |
yes |
--address |
string |
yes |
Headers (via --cli-input-json only) |
[]monitor.ChannelHeader |
|
--otp-ref |
string |
|
--otp |
string |
vngcloud monitor create-channel --name <name> --type Webhook --cli-input-json file://channel.jsonKind: Write.
Notifications' three lists, In-alarm, Up, and Undetermined, name by ID which channels a check alerts on each alarm transition; setting Notifications through --cli-input-json replaces all three at once, so a partial value, such as only In-alarm, clears the other two. Each key is the API's own wire spelling, not the Go field name (In-alarm, never InAlarm); an unrecognized key is refused with exit code 2 before any request.
| Flag | Type | Required |
|---|---|---|
--name |
string |
yes |
--url |
string |
yes |
Locations (via --cli-input-json only) |
[]string |
yes |
--method |
string |
|
Headers (via --cli-input-json only) |
map[string]string |
|
Query (via --cli-input-json only) |
map[string]string |
|
--body |
string |
|
--timeout |
int |
|
--test-frequency |
int |
|
--tests |
int |
|
--failed-locations |
int |
|
Assertions (via --cli-input-json only) |
[]monitor.Assertion |
|
Notifications (via --cli-input-json only) |
monitor.CheckNotifications |
vngcloud monitor create-check --name <name> --url <url> --cli-input-json '{"Locations":["<location-id>"]}'Kind: Write.
Unverified live: the create response's own shape has never been captured, since the console ignores it; the create trusts an id at data.id or a top-level id, printed as AlarmID, or otherwise finds the alarm by its exact --name once it settles. Refuses a NaN or infinite --threshold-value, with InvalidUsage, before any request. It then refuses a --name a log alarm already has, with InvalidUsage, creating nothing. --query-string and an inline or file Filter (set only through --cli-input-json) must both be given or both left out; leaving both out sends a match-all query. The create POST is never retried after a failure that may have already reached the server: list-alarms by --name before creating again, rather than repeating this command. Without --no-wait, waits up to 120 seconds, polling every 2 seconds, until the alarm reads ACTIVE; ERROR or FAILED is WriteFailed. A timeout, or any other failure during that wait, is NotSettled, and the write must not be repeated. --no-wait returns at once with only AlarmID set.
| Flag | Type | Required |
|---|---|---|
--name |
string |
yes |
--log-project-id |
string |
yes |
--threshold-value |
*float64 |
yes |
--description |
string |
|
--severity |
string |
|
--query-string |
string |
|
Filter (via --cli-input-json only) |
jsontext.Value |
|
--threshold-type |
string |
|
--condition |
string |
|
--time-frame |
int |
|
--group-by-field |
string |
|
--agg-field |
string |
|
--agg-type |
string |
|
--in-alarm |
[]string |
|
--ok |
[]string |
|
Resend (via --cli-input-json only) |
*monitor.LogAlarmResend |
|
--no-wait |
bool |
vngcloud monitor create-log-alarm --name <name> --log-project-id <log-project-id> --threshold-value <threshold-value>Kind: Write.
Orders nothing above --max-price, default 0: a bare create-log-project --name only orders a free class and retention option. --max-price NaN, Inf, or negative exits 2 (InvalidUsage) before any request. The quote and the order build from one class-list read and the same order body, so the order always prices what was just quoted; a quote with no price, or a project already named --name, also refuses the order with InvalidUsage. The order itself is never retried after a failure that may have already reached the server; list log projects by name before ordering again rather than repeating this command. The Basic class allows 3 orders or recoveries a month; the next one gets 409 Conflict. Without --no-wait, waits up to 120 seconds for the new project to reach ACTIVE, then prints it; a timeout, or any other failure during that wait, is NotSettled, and the write must not be repeated. --no-wait returns at once with only OrderID set, from the order response's own orderId: that response carries no project fields, so LogProject stays at its zero value.
| Flag | Type | Required |
|---|---|---|
--name |
string |
yes |
--description |
string |
|
--class |
string |
|
--retention-days |
int |
|
--gb-per-day |
int |
|
--max-price |
float64 |
|
--no-wait |
bool |
vngcloud monitor create-log-project --name <name>Kind: Write, destructive.
| Flag | Type | Required |
|---|---|---|
--channel-id |
string |
yes |
vngcloud monitor delete-channel --channel-id <channel-id> --yesKind: Write, destructive.
| Flag | Type | Required |
|---|---|---|
--check-id |
string |
yes |
vngcloud monitor delete-check --check-id <check-id> --yesKind: Write, destructive.
Reads the alarm first and refuses with InvalidUsage, deleting nothing, when its Kind is not Log: nothing shows the server itself refuses a metric alarm's ID on this DELETE path, so the command checks first. A 404 on that read exits the same as a 404 from the delete itself, NotFound. Past that read, deletes the alarm and its history at once with no wait, unlike delete-log-project. A repeat delete of a deleted alarm gets a 400 (sometimes 500) from the server, and the alarm can stay in the log alarm list for a few seconds after the first delete. The command then lists for up to 30 seconds, returns NotFound once the alarm is absent, and returns the server's error if the alarm is still listed at that bound.
| Flag | Type | Required |
|---|---|---|
--alarm-id |
string |
yes |
vngcloud monitor delete-log-alarm --alarm-id <alarm-id> --yesKind: Write, destructive.
Moves the project to trash, stopping its billing; its logs are lost. --purge also deletes it from trash, as a second request in the same call, sent even when the first delete 404s, since the project most likely already sits in trash from an earlier call; when the purge 404s too, the command returns NotFound, the same as a plain delete of a project that never existed. Without --no-wait, reads the project first as a baseline, then waits up to 60 seconds after the delete (and purge) for a read to show the change; a timeout, or any other failure during that wait, is NotSettled, and the write must not be repeated. With --purge, when that baseline read itself 404s, the command skips the wait and returns once the delete and the purge each either succeed or 404. --purge in one call has not run live; a purge sent right after a delete returned 409 Conflict once.
Unverified live: the delete and purge responses' own shape and status have never been captured, so this command discards the response body and treats either 200 or 204 as success.
| Flag | Type | Required |
|---|---|---|
--log-project-id |
string |
yes |
--purge |
bool |
|
--no-wait |
bool |
vngcloud monitor delete-log-project --log-project-id <log-project-id> --yesKind: Read.
Unverified live: the test account has no alarm, so this output shape is inferred from the console's code, not a live capture.
A missing alarm exits 1, not 4: the API answers an unknown ID with a 500, not a 404, so this command never reports the NotFound error class.
| Flag | Type | Required |
|---|---|---|
--alarm-id |
string |
yes |
vngcloud monitor get-alarm --alarm-id <alarm-id> --query AlarmKind: Read.
Redacts every header value and every Address except an Email, SMS, or Telegram channel's, since a Webhook, Slack, or other channel's Address can carry a bearer token; only Email, SMS, and Telegram addresses print in full.
| Flag | Type | Required |
|---|---|---|
--channel-id |
string |
yes |
vngcloud monitor get-channel --channel-id <channel-id> --query ChannelKind: Read.
| Flag | Type | Required |
|---|---|---|
--check-id |
string |
yes |
vngcloud monitor get-check --check-id <check-id> --query CheckKind: Read.
| Flag | Type | Required |
|---|---|---|
--log-project-id |
string |
yes |
vngcloud monitor get-log-project --log-project-id <log-project-id> --query LogProjectKind: Read.
Unverified live: the test account has no alarm, so this output shape is inferred from the console's code, not a live capture.
| Flag | Type | Required |
|---|---|---|
--kind |
string |
yes |
--name |
string |
|
--status |
string |
|
--severity |
string |
|
--page |
int |
|
--size |
int |
vngcloud monitor list-alarms --kind LogKind: Read.
No fields.
vngcloud monitor list-channel-typesKind: Read.
Redacts every header value and every Address except an Email, SMS, or Telegram channel's, since a Webhook, Slack, or other channel's Address can carry a bearer token; only Email, SMS, and Telegram addresses print in full.
| Flag | Type | Required |
|---|---|---|
--type |
string |
|
--page |
int |
|
--size |
int |
vngcloud monitor list-channelsKind: Read.
No fields.
vngcloud monitor list-checksKind: Read.
No fields.
vngcloud monitor list-locationsKind: Read.
No fields.
vngcloud monitor list-log-project-classesKind: Read.
| Flag | Type | Required |
|---|---|---|
--search |
string |
|
--billing-status |
string |
|
--page |
int |
|
--size |
int |
vngcloud monitor list-log-projectsKind: Write.
| Flag | Type | Required |
|---|---|---|
--check-id |
string |
yes |
vngcloud monitor pause-check --check-id <check-id>Kind: Read.
Ignores MaxPrice and NoWait even when an inline --cli-input-json value sets them: both govern only create-log-project's own price ceiling and wait, never this read, which neither orders anything nor waits. Prices are VND totals that include VAT; the API gives no VAT breakdown.
| Flag | Type | Required |
|---|---|---|
--name |
string |
yes |
--description |
string |
|
--class |
string |
|
--retention-days |
int |
|
--gb-per-day |
int |
|
MaxPrice (via --cli-input-json only) |
float64 |
|
NoWait (via --cli-input-json only) |
bool |
vngcloud monitor quote-create-log-project --name <name>Kind: Write.
| Flag | Type | Required |
|---|---|---|
--check-id |
string |
yes |
vngcloud monitor resume-check --check-id <check-id>Kind: Write.
Refuses Type Webhook before any request; Webhook needs no OTP. Refuses a literal --address, or an inline --cli-input-json value that sets Address, for Type Slack, since a Slack address is a webhook URL that can carry a secret; refuses an inline --cli-input-json value that sets Headers for every Type. Prints Ref and ExpiresAt: give Ref to create-channel or update-channel as --otp-ref, with the code read from the address as --otp, before the OTP expires. Never retried after an ambiguous failure, since a retry could message the address a second time. SMS and Email beyond the free 20 each spend a paid package, and sending this OTP counts toward it.
| Flag | Type | Required |
|---|---|---|
--type |
string |
yes |
--address |
string |
yes |
Headers (via --cli-input-json only) |
[]monitor.ChannelHeader |
vngcloud monitor send-channel-otp --type Email --address <address>Kind: Write.
Refuses every literal --address, or an inline --cli-input-json value that sets Address or Headers, with exit code 2, since this Input carries no Type for the guard to check. Pass Address (and Headers) only through --cli-input-json file://channel.json. The write's own Output is redacted the same way a channel read is.
Email, Slack, SMS, and Telegram need an OTP to create or to change Address: run send-channel-otp first, then pass its Ref as --otp-ref and the code read from the address as --otp. A wrong or expired OTP exits with error code OTPRejected and sends no create or update; the validate step, like the create or update itself, is never retried after an ambiguous failure. Webhook needs neither flag.
| Flag | Type | Required |
|---|---|---|
--channel-id |
string |
yes |
--name |
*string |
|
--address |
*string |
|
Headers (via --cli-input-json only) |
*[]monitor.ChannelHeader |
|
--otp-ref |
string |
|
--otp |
string |
vngcloud monitor update-channel --channel-id <channel-id> --cli-input-json file://channel.jsonKind: Write.
Notifications' three lists, In-alarm, Up, and Undetermined, name by ID which channels a check alerts on each alarm transition; setting Notifications through --cli-input-json replaces all three at once, so a partial value, such as only In-alarm, clears the other two. Each key is the API's own wire spelling, not the Go field name (In-alarm, never InAlarm); an unrecognized key is refused with exit code 2 before any request.
| Flag | Type | Required |
|---|---|---|
--check-id |
string |
yes |
--name |
*string |
|
--url |
*string |
|
--method |
*string |
|
Headers (via --cli-input-json only) |
*map[string]string |
|
Query (via --cli-input-json only) |
*map[string]string |
|
--body |
*string |
|
--timeout |
*int |
|
--test-frequency |
*int |
|
--tests |
*int |
|
--failed-locations |
*int |
|
Locations (via --cli-input-json only) |
*[]string |
|
Assertions (via --cli-input-json only) |
*[]monitor.Assertion |
|
Notifications (via --cli-input-json only) |
*monitor.CheckNotifications |
vngcloud monitor update-check --check-id <check-id> --name <name>Kind: Write.
Refuses a NaN or infinite --threshold-value, and --query-string set without an inline or file --cli-input-json Filter (or the reverse), both with InvalidUsage, before any request. Reads the alarm first and refuses with InvalidUsage, sending no PUT, when its Kind is not Log, since this command never updates a metric alarm; when its Status is anything but ACTIVE, since the server answers 403 for about 30 seconds after a create; retry once get-alarm shows ACTIVE; or when the read is missing a field the create body always sends (LogProjectID, ThresholdType, Condition, or a nonzero TimeFrame). Past that read, sends every field the command line left unset back unchanged, so update-log-alarm --alarm-id --name changes only the name. A set --query-string/Filter pair follows create-log-alarm's own pairing rule; leaving both unset resends the read's own pairing unchanged, even if it was never valid to create. A new --log-project-id is always re-read for its current name, even when it names the same project the alarm already has. Without --no-wait, waits the same way create-log-alarm does; a timeout, or any other failure during that wait, is NotSettled, and the write must not be repeated.
| Flag | Type | Required |
|---|---|---|
--alarm-id |
string |
yes |
--no-wait |
bool |
|
--name |
*string |
|
--description |
*string |
|
--severity |
*string |
|
--log-project-id |
*string |
|
--query-string |
*string |
|
Filter (via --cli-input-json only) |
*jsontext.Value |
|
--threshold-type |
*string |
|
--condition |
*string |
|
--threshold-value |
*float64 |
|
--time-frame |
*int |
|
--group-by-field |
*string |
|
--agg-field |
*string |
|
--agg-type |
*string |
|
InAlarm (via --cli-input-json only) |
*[]string |
|
OK (via --cli-input-json only) |
*[]string |
|
Resend (via --cli-input-json only) |
*monitor.LogAlarmResend |
vngcloud monitor update-log-alarm --alarm-id <alarm-id>SDK
- Getting Started
- Authentication
- Configuration
- Errors
- Services
- Backup
- Billing and Pricing
- CDN
- Compute
- Compute Servers
- DNS
- Container Registry
- IAM
- Load Balancer
- Monitor
- Monitor Alerts
- Monitor Log Alarms
- Network
- Network Route Tables
- Network ACLs
- Network DHCP Options
- Network Virtual IPs
- Tagging
- Storage
- Storage Workload Access
- Storage Objects
- Storage Object Copy
- Storage: Projects
- Storage: Bucket Policy
- Storage: Bucket Settings
- Security
- Volume
- VKS
- Limitations
CLI