LinuxCommandLibrary

gnmic-sub

subscribe to gNMI streaming telemetry

TLDR

Subscribe to a path

$ gnmic -a [host:port] sub --path [/state/port]
copy
Subscribe with sample interval
$ gnmic -a [host:port] sub --path [/state/port] --sample-interval [30s]
copy
Subscribe with on-change mode
$ gnmic -a [host:port] sub --path [/state/port] --stream-mode on-change
copy
Subscribe with heartbeat interval
$ gnmic -a [host:port] sub --path [/path] --stream-mode on-change --heartbeat-interval [1m]
copy
Subscribe to multiple paths
$ gnmic -a [host:port] sub --path [/path1] --path [/path2]
copy
Subscribe with authentication
$ gnmic -a [host:port] -u [user] -p [pass] sub --path [/path]
copy

SYNOPSIS

gnmic sub | subscribe [options]

DESCRIPTION

gnmic sub (or subscribe) sends a gNMI Subscribe RPC to network devices for streaming telemetry. It supports multiple subscription modes: ONCE (immediate single response), POLL (on-demand), and STREAM (continuous updates). Stream mode supports SAMPLE (periodic) and ON_CHANGE (event-driven) delivery.

PARAMETERS

--path path

gNMI path to subscribe to.
--mode mode
Subscription mode: STREAM, ONCE, POLL.
--stream-mode mode
Stream mode: SAMPLE, ONCHANGE, TARGETDEFINED.
--sample-interval duration
Sample interval for SAMPLE mode.
--heartbeat-interval duration
Heartbeat interval for ON_CHANGE mode.
--suppress-redundant
Suppress redundant updates.
--updates-only
Only send updates, not initial state.
--quiet
Do not output to stdout.

SEE ALSO

gnmic(1), gnmic-get(1)

> TERMINAL_GEAR

Curated for the Linux community

Copied to clipboard

> TERMINAL_GEAR

Curated for the Linux community