Animated CTA Banner
MapYourTech
MapYourTech has always been about YOUR tech journey, YOUR questions, YOUR thoughts, and most importantly, YOUR growth. It’s a space where we "Map YOUR Tech" experiences and empower YOUR ambitions.
To further enhance YOUR experience, we are working on delivering a professional, fully customized platform tailored to YOUR needs and expectations.
Thank you for the love and support over the years. It has always motivated us to write more, share practical industry insights, and bring content that empowers and inspires YOU to excel in YOUR career.
We truly believe in our tagline:
“Share, explore, and inspire with the tech inside YOU!”
Let us know what YOU would like to see next! Share YOUR thoughts and help us deliver content that matters most to YOU.
Share YOUR Feedback
Automation

gRPC Network Management Interface (gNMI and Streaming Telemetry)

Pinterest LinkedIn Tumblr

As modern networks scale, the demand for real-time monitoring and efficient management of network devices has grown significantly. Traditional methods of network monitoring, such as SNMP, often fall short when it comes to handling the dynamic and high-performance requirements of today’s networks. gNMI (gRPC Network Management Interface), combined with streaming telemetry, provides a more efficient, scalable, and programmable approach to managing and monitoring network devices.Lets explore gNMI, its architecture, key features, how it differs from traditional protocols like SNMP and NETCONF, and its advantages. We will also look at how streaming telemetry works with gNMI to deliver real-time data from network devices, including use cases in modern networking and optical networks.

What Is gNMI?

gNMI (gRPC Network Management Interface) is a network management protocol developed by Google and other major tech companies to provide real-time configuration and state retrieval from network devices. Unlike traditional polling methods, gNMI operates over gRPC (Google Remote Procedure Call) and supports streaming telemetry, which provides real-time updates on network performance and device health.

Key Features:

  • Real-Time Telemetry: gNMI enables real-time, high-frequency data streaming from devices to a centralized monitoring system.
  • gRPC-Based: It uses the high-performance gRPC framework for communication, which is built on HTTP/2 and supports bidirectional streaming, ensuring low latency and high throughput.
  • Full Configuration Support: gNMI allows network operators to configure devices programmatically and retrieve both operational and configuration data.
  • Data Model Driven: gNMI uses YANG models to define the data being monitored or configured, ensuring consistency across vendors.

gNMI and Streaming Telemetry Overview

Streaming telemetry allows network devices to push data continuously to a monitoring system without the need for constant polling by management tools. gNMI is the protocol that facilitates the delivery of this telemetry data using gRPC, which provides a reliable and efficient means of communication.

With gNMI, network operators can:

  • Stream performance metrics, such as CPU usage, bandwidth utilization, and link health, at granular intervals.
  • Set up real-time alerts for threshold breaches (e.g., high latency, packet loss).
  • Push configuration updates to devices dynamically and validate changes in real-time.

gNMI Architecture

gNMI operates in a client-server model, with the following components:

  • gNMI Client: The application or system (often a monitoring tool or automation platform) that sends configuration requests or subscribes to telemetry streams from devices.
  • gNMI Server: The network device (router, switch, optical device) that supports gNMI and responds to configuration requests or streams telemetry data.
  • gRPC Transport: gNMI uses gRPC as its underlying transport layer. gRPC operates over HTTP/2, supporting bidirectional streaming and ensuring low-latency communication.

gNMI Operations

gNMI supports several operations for interacting with network devices:

  • Get: Retrieves the current configuration or operational state of the device.
  • Set: Pushes a new configuration or modifies an existing one.
  • Subscribe: Subscribes to real-time telemetry updates from the device. This is the core of streaming telemetry in gNMI.
    • On-Change: Data is pushed only when there is a change in the monitored metric (e.g., interface goes up/down).
    • Sampled: Data is pushed at regular intervals, regardless of changes.
  • Capabilities: Queries the device to determine the supported YANG models and features.

How gNMI Works: Streaming Telemetry Example

In traditional SNMP-based monitoring, devices are polled periodically, and data is retrieved based on requests from the monitoring system. This method introduces latency and can miss important real-time events. Streaming telemetry, on the other hand, allows network devices to continuously push real-time data to the monitoring system, providing better visibility into network performance.

Streaming Telemetry with gNMI:

  1. Subscribe to Metrics: The gNMI client (e.g., a telemetry collector) subscribes to specific metrics from the device, such as interface statistics or CPU usage.
  2. Data Streaming: The gNMI server on the device streams updates to the client either on-change or at specified intervals.
  3. Data Collection: The telemetry collector processes the streamed data and provides real-time insights, dashboards, or alerts based on predefined thresholds.

Example of a gNMI Subscription to Monitor Optical Channel Power Levels:

gnmi_subscribe -target_addr "192.168.1.10:57400" -tls -username admin -password admin \ -path "/optical-channel/state/output-power" -mode "sample" -interval "10s"

In this example, the gNMI client subscribes to the output power of an optical channel, receiving updates every 10 seconds.

gNMI vs. Traditional Protocols (SNMP, NETCONF)

gNMI Use Cases

Real-Time Network Monitoring

gNMI is ideal for real-time monitoring in dynamic networks where performance metrics need to be collected continuously. With on-change and sampled telemetry, operators can monitor:

  • Interface statistics: Monitor packet drops, errors, and link status changes.
  • CPU/Memory usage: Track the health of devices and identify potential bottlenecks.
  • Optical signal metrics: For optical networks, monitor key metrics like signal power, bit error rate (BER), and latency in real-time.

Automated Network Configuration

gNMI’s Set operation allows network operators to push configurations programmatically. For example, operators can automate the deployment of configurations across thousands of devices, ensuring consistency and reducing manual effort.

Streaming Telemetry in Optical Networks

In optical networks, gNMI plays a crucial role in monitoring and managing optical channels and transponders. For example, gNMI can be used to:

  • Stream telemetry data on optical power levels, wavelength performance, and optical amplifiers.
  • Dynamically configure optical channel parameters, such as frequency and power output, and monitor changes in real time.

Example: Streaming Telemetry from an Optical Device:

gnmi_subscribe -target_addr "10.0.0.5:57400" -tls -username admin -password admin \ -path "/optical-channel/state/frequency" -mode "on_change"

This command subscribes to the optical channel’s frequency and receives real-time updates whenever the frequency changes.

Advantages of gNMI and Streaming Telemetry

gNMI, combined with streaming telemetry, offers numerous advantages:

  • Real-Time Data: Provides immediate access to changes in network performance, allowing operators to react faster to network issues.
  • Efficiency: Instead of polling devices for status, telemetry streams data as it becomes available, reducing network overhead and improving performance in large-scale networks.
  • High Throughput: gRPC’s low-latency, bidirectional streaming makes gNMI ideal for handling the high-frequency data updates required in modern networks.
  • Vendor Agnostic: gNMI leverages standardized YANG models, making it applicable across multi-vendor environments.
  • Secure Communication: gNMI uses TLS to secure data streams, ensuring that telemetry data and configuration changes are encrypted.

Disadvantages of gNMI

While gNMI provides significant improvements over traditional protocols, there are some challenges:

  • Complexity: Implementing gNMI and streaming telemetry requires familiarity with YANG models, gRPC, and modern networking concepts.
  • Infrastructure Requirements: Streaming telemetry generates large volumes of data, requiring scalable telemetry collectors and back-end systems capable of processing and analyzing the data in real-time.
  • Limited Legacy Support: Older devices may not support gNMI, meaning that hybrid environments may need to use SNMP or NETCONF alongside gNMI.

gNMI and Streaming Telemetry Example for Optical Networks

Imagine a scenario in an optical transport network (OTN) where it is crucial to monitor the power levels of optical channels in real-time to ensure the stability of long-haul links.

Step 1: Set Up a gNMI Subscription

Network operators can set up a gNMI subscription to monitor the optical power of channels at regular intervals, ensuring that any deviation from expected power levels is immediately reported.

gnmi_subscribe -target_addr "10.0.0.8:57400" -tls -username admin -password admin \ -path "/optical-channel/state/output-power" -mode "sample" -interval "5s"

Step 2: Real-Time Data Streaming

The telemetry data from the optical transponder is streamed every 5 seconds, allowing operators to track power fluctuations and quickly detect any potential signal degradation.

Step 3: Trigger Automated Actions

If the power level crosses a predefined threshold, automated actions (e.g., notifications or adjustments) can be triggered.

gNMI vs. Other Telemetry Approaches: A Quick Comparison

Summary

gNMI and streaming telemetry are essential tools for modern network management, particularly in dynamic environments requiring real-time visibility into network performance. By replacing traditional polling-based methods with real-time data streams, gNMI provides a more efficient, scalable, and secure approach to monitoring and configuring devices. The protocol’s integration with YANG data models ensures vendor neutrality and standardization, while its use of gRPC enables high-performance, low-latency communication. As networks evolve, particularly in areas like optical networking, gNMI and streaming telemetry will continue to play a pivotal role in ensuring operational efficiency and network reliability.

 

Author

Share and Explore the Tech Inside You!!!

Write A Comment