gnmic-subscribe
subscribe to gNMI streaming telemetry (full form)
TLDR
Subscribe to a path
$ gnmic -a [host:port] subscribe --path [/state/port]
Subscribe with sample interval$ gnmic -a [host:port] subscribe --path [/state/port] --sample-interval [30s]
Subscribe with on-change mode$ gnmic -a [host:port] subscribe --path [/state/port] --stream-mode on-change
Subscribe with heartbeat interval$ gnmic -a [host:port] subscribe --path [/path] --stream-mode on-change --heartbeat-interval [1m]
Subscribe to multiple paths$ gnmic -a [host:port] subscribe --path [/path1] --path [/path2]
Subscribe with authentication$ gnmic -a [host:port] -u [user] -p [pass] subscribe --path [/path]
SYNOPSIS
gnmic subscribe [options]
DESCRIPTION
gnmic 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. This is the full form of the gnmic sub command.
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.
