gNMI Service
The gNMI (gRPC Network Management Interface) is a protocol based on gRPC that configures and monitors network devices. Developed by OpenConfig specifically for network management, gNMI allows network operators to retrieve and modify device configuration data and subscribe to real-time telemetry data from network devices. Data collection is a key task in telemetry solutions. gNMI supports subscription modes such as ONCE, POLL, and STREAM for telemetry updates. gNMI leverages the gRPC framework and uses efficient data encoding formats such as Protocol Buffers (protobuf), and assures secure communication using TLS. YANG models to define structure of configuration and telemetry data.
The main components of gNMI are:
-
gNMI Client: Runs on an external system. It sends gNMI requests to configure the device, retrieve configuration data, and subscribe to telemetry streams.
-
gNMI Server: Runs on the network device and provides access to telemetry and configuration data. The gNMI server processes the request based on its type. If it is a configuration management change, it updates the device configuration and sends a response to the client. The data will be streamed to the gNMI client if it is a telemetry data collection request.
gNMI supports the following Remote Procedure Calls (RPCs) for managing and monitoring network devices:
-
Get: This RPC retrieves the current state of the network device, including configuration and operational data.
Note:In the gNMI get command, the
type
option is used to specify the type of data to be retrieved. The available options areCONFIG
,STATE
, andALL
. The valid type option isCONFIG
. Encoding defines the value encoding formats that are supported by the gNMI protocol.JSON
,BYTES
,PROTO
,ASCII
, andJSON_IETF
are available options. The valid encoding options areJSON_IETF
andASCII
. Choosing any other configuration apart from the valid options will result in an error message. -
Set: The set RPC modifies the configuration of the network device.
-
Subscribe: You can use this RPC to subscribe to telemetry data from a network device. The following subscription modes are supported:
- ONCE: Retrieves the current values only once.
- POLL: Sends current values whenever a poll message is received.
- STREAM: Continuously sends updates at specified intervals or when changes occur.
For more information, see Subscribing to Telemetry Data Using gNMI
-
Capabilities: This RPC discovers the capabilities of the network device, such as supported models and encodings.