gnmic-get
retrieve configuration or state from gNMI devices
TLDR
Get interface config
$ gnmic get -a [router:57400] --path [/interfaces]
Get with encoding$ gnmic get -a [router:57400] --path [/system] --encoding json
Get multiple paths$ gnmic get -a [router:57400] --path [/interfaces] --path [/system]
Get with type$ gnmic get -a [router:57400] --path [/interfaces] --type config
SYNOPSIS
gnmic get [options]
DESCRIPTION
gnmic get retrieves configuration or state data from gNMI-enabled devices. It fetches data at specified YANG paths and returns it in the requested encoding.
The command supports multiple paths, various encodings, and data type filtering. It is used for configuration retrieval and state inspection in network automation workflows.
PARAMETERS
-a ADDRESS
Target address.--path PATH
YANG path to retrieve.--encoding ENC
Data encoding (json, proto).--type TYPE
Data type (config, state, all).--help
Display help information.
CAVEATS
Path must be valid YANG path. Device must support requested encoding. Large datasets may timeout.
HISTORY
gnmic get is a subcommand of gnmic, the gNMI client created by Nokia.
