# Protocol Monitors (CLI)

Source: https://www.observeone.com/docs/cli/protocol-monitors

- [Docs](/docs)
- [CLI](/docs/cli)
- Protocol Monitors (CLI)

# Protocol Monitors (CLI)

Copy Markdown

Manage SSL, TCP, UDP, and DB monitors from the obs CLI. Certificate expiry, port reachability, and database checks with the same CRUD surface as url-monitor.

Manage SSL, TCP, UDP, and database monitors. Each has the same surface as
[url monitors](/docs/cli/monitors): CRUD plus run, runs, toggle,
toggle-muted.

These connect from ObserveOne&#x27;s cloud

TCP, UDP, and database monitors reach host:port directly from ObserveOne&#x27;s
infrastructure, so the target must be reachable on the public internet, not
just from inside your network. See
[Monitoring private infrastructure](/docs/product/monitoring-private-infrastructure)
for exposure guidance before pointing one at a database or internal service.

Copy

obs ssl-monitor create --name "cert" --hostname example.com --port 443 --warn-days 14

obs tcp-monitor create --name "PG" --host db.example.com --port 5432 --expect-banner "..."

obs udp-monitor create --name "DNS" --host 1.1.1.1 --port 53 --expect-response

obs db-monitor create --name "PG" --host db.example.com --port 5432 --protocol postgres --tls

obs ssl-monitor create --name "cert" --hostname example.com --port 443 --warn-days 14

obs tcp-monitor create --name "PG" --host db.example.com --port 5432 --expect-banner "..."

obs udp-monitor create --name "DNS" --host 1.1.1.1 --port 53 --expect-response

obs db-monitor create --name "PG" --host db.example.com --port 5432 --protocol postgres --tls

Commands and aliases: obs ssl-monitor (ssl), obs tcp-monitor (tcp),
obs udp-monitor (udp), obs db-monitor (db).

Type-specific flags:

CommandFlags

ssl-monitor--hostname (bare host, required), --port (default 443), --warn-days (default 30)

tcp-monitor--host, --port (required), --payload-hex, --expect-banner

udp-monitor--host, --port (required), --payload-hex, --expect-response

db-monitor--host, --port (required), --protocol (postgres|mysql|redis), --tls

Common flags (all four): -n, --name, -d, --description, -i, --interval
(cron), --timeout <ms>, --region <region> (repeatable), --retry-count <n>, --retry-interval <seconds>, --team-id <id>, --alert-channel-id <id> (repeatable), --no-alerts.

Copy

obs ssl-monitor list

obs ssl-monitor get <id>

obs ssl-monitor runs <id> --limit 10 # Recent executions

obs ssl-monitor run <id> # Trigger a manual run

obs ssl-monitor toggle <id> # Pause or resume execution

obs ssl-monitor toggle-muted <id> # Mute or unmute alerts without pausing

obs ssl-monitor delete <id> -y

obs ssl-monitor list

obs ssl-monitor get <id>

obs ssl-monitor runs <id> --limit 10 # Recent executions

obs ssl-monitor run <id> # Trigger a manual run

obs ssl-monitor toggle <id> # Pause or resume execution

obs ssl-monitor toggle-muted <id> # Mute or unmute alerts without pausing

obs ssl-monitor delete <id> -y

Every type also supports --file <path> create and obs schema <type> for
the JSON Schema (Draft-07) definition, matching obs monitor and obs check.

## Environments[#](#environments)

Each of these monitor types can be bound to a project and environment from the dashboard, the same as [url monitors](/docs/cli/monitors#environments). {{KEY}} tokens resolve from the bound environment&#x27;s variables and secrets at run time, on manual and scheduled runs alike, in these fields per type:

TypeFields with {{KEY}} resolution

ssl-monitorhostname

tcp-monitorhost, payload-hex, expect-banner

udp-monitorhost, payload-hex

db-monitorhost

Resolution happens server-side only: the stored monitor keeps the raw {{KEY}} template, and results show the token rather than the resolved secret value.

See also: [Monitors](/docs/cli/monitors) for basic HTTP ping monitors, and
the [CLI reference overview](/docs/cli/reference).

Was this page helpful?
