sng monitor
Being rolled out. The interface described here is the one of the next release: it may still change, and may not be enabled on your tenant yet.
The sng monitor commands are being rolled out in the CLI, and monitoring is being deployed.
The sng monitor group is a shortcut for managing the
Monitor manifests of the desired state: create
writes and applies the manifest, list and delete are equivalent to sng kind list Monitor and
sng kind delete Monitor NAME. Notification channels and status pages have no dedicated command:
generate them with sng template gen NotificationChannel|StatusPage, then sng apply.
The global flags (--config, --json, -v, --version) are described in
the CLI index. All commands require a tenant session (sng tenant use NAME),
as for sng apply.
IAM actions:
| Command | IAM action | Route |
|---|---|---|
list | deploy:list | GET /v1/resources/Monitor |
create | deploy:write | POST /v1/apply |
delete | deploy:delete | DELETE /v1/resources/Monitor/{name} |
sng monitor list
sng monitor list
Lists the Monitor manifests of the current tenant. Does not show the state of
the monitors: see the status page.
| Flag | Type | Default | Description |
|---|---|---|---|
| (no flags of its own) |
sng monitor list
NAME KEY UPDATED
api acme/…/Monitor/api.yml 2026-10-07T10:02:11Z
db acme/…/Monitor/db.yml 2026-10-07T10:03:48Z
Without monitors: no Monitor.
--json output: {"kind": "Monitor", "items": [{"name": "api", "key": "…", "updated_at": "…"}]}.
sng monitor create
sng monitor create NAME (--http URL | --tcp HOST:PORT | --dns SERVER --query NAME)
[--interval D] [--timeout D] [--threshold N] [--expect CODES]
[--contains TEXT] [--channel NAME]... [--display-name TEXT] [--dry-run]
Writes a Monitor manifest and applies it. Exactly one target:
--http URL: HTTP(S) check;--expect 200,204(default: any 2xx),--contains TEXT. Anhttps://URL addstls: {}: alerts before the certificate expires (14 and 3 days).--tcp HOST:PORT: TCP connection check.--dns SERVER --query NAME: DNS query (typeA) sent toSERVER.
Only public targets are accepted: the platform refuses private addresses and internal names. Running the command again on an existing name replaces the manifest.
| Argument | Description |
|---|---|
NAME | monitor name: lowercase, digits, and -, at most 63 characters |
| Flag | Type | Default | Description |
|---|---|---|---|
--http | string | http(s):// URL to check; credentials in the URL are refused | |
--tcp | string | HOST:PORT to connect to | |
--dns | string | DNS server queried (with --query) | |
--query | string | name resolved by the DNS check | |
--interval | string | 5m | 30s, 1m, 2m, 5m, or 10m; the minimum depends on the tier (5 min on 3XS) |
--timeout | string | 10s | duration of a check, from 1s to 30s, lower than --interval |
--threshold | int | 3 | consecutive failures before an outage (1 to 5) |
--expect | list of integers | accepted HTTP codes (200,204); requires --http | |
--contains | string | text the HTTP body must contain (at most 256 characters); requires --http | |
--channel | string, repeatable | NotificationChannel notified on outage and recovery (at most 10) | |
--display-name | string | NAME | public label on status pages (at most 63 characters) |
--dry-run | bool | false | shows the manifest without applying it |
sng monitor create api --http https://api.example.com/health --expect 200 --channel ops
sng monitor create db --tcp db.example.com:5432 --interval 10m
sng monitor create resolver --dns ns1.example.com --query example.com --dry-run
monitor "api" declared in tenant acme: …
--dry-run:
apiVersion: monitoring.stackngo.io/v1alpha1
kind: Monitor
metadata:
name: resolver
spec:
type: DNS
target: ns1.example.com
interval: 5m
timeout: 10s
failureThreshold: 3
dns:
queryName: example.com
--json output: {"uploads": [{"key": "acme/…/Monitor/api.yml", "kind": "Monitor", "name": "api", …}]}.
For options missing from the command (HTTP method, headers, bodyMustNotContain,
ipFamily, DNS query type, tcp.tls, TLS thresholds, paused), write the manifest:
sng monitor create … --dry-run > api.yml, edit it, then sng apply api.yml.
Errors:
| Message | Cause |
|---|---|
exactly one of --http, --tcp or --dns is required | no target, or several |
monitor name "…": lowercase letters, digits and '-' (63 max.) | invalid name |
--interval "…": one of 30s, 1m, 2m, 5m, 10m | interval not in the list |
--timeout "…": between 1s and 30s | timeout out of bounds or malformed |
--timeout 30s must be below --interval 30s | timeout ≥ interval |
--threshold must be between 1 and 5 | threshold out of bounds |
--expect and --contains need --http | HTTP options without --http |
--expect "…": HTTP status code expected | non-numeric code or outside 100–599 |
--http "…": http(s)://host/path expected | malformed URL |
--http: credentials in the URL are refused | https://user:pass@… |
--tcp "…": HOST:PORT expected | missing port or outside 1–65535 |
--dns needs --query NAME, --query needs --dns | incomplete DNS options |
--channel "…": NotificationChannel name expected | invalid channel name |
--channel: 10 channels max | more than 10 distinct channels |
sng monitor delete
sng monitor delete NAME [--yes]
Deletes the Monitor NAME manifest from the desired state; the monitor is no longer probed.
A status page that still lists it is then rejected: update it.
| Argument | Description |
|---|---|
NAME | monitor name |
| Flag | Type | Default | Description |
|---|---|---|---|
-y, --yes | bool | false | confirms without a prompt; required outside an interactive terminal |
sng monitor delete api
sng monitor delete test-alerte --yes
⚠ Suppression définitive du Monitor "api".
Tapez « oui » pour confirmer : oui
deleted: acme/…/Monitor/api.yml
--json output: the response of the deletion API (key, …).
Errors: confirmation requise : relancez avec --yes ou depuis un terminal interactif,
opération annulée.
See also
- Guides: Uptime monitors, Notification channels, Status page
- Reference:
Monitor,NotificationChannel,StatusPage,sng kind,sng template