Understanding gRPC-based Telemetry

gRPC (Google Remote Procedure Call) is a communication technology based on a modern open source high performance software framework that has been adopted in numerous applications.

There are several benefits when using gRPC: a secure HTTP/2 transport with TLS authentication and encryption support, an underlying message interchange format (protobuf), performance and scalability, flexible authentication, streaming capabilities, push/pull data exchange, etc.

gRPC-based telemetry leverages gRPC’s benefits to remotely collect data from devices at high speed and with great scalability. Streaming of telemetry data over gRPC can help accelerate network troubleshooting, automation management, traffic analysis and optimization.

Unlike other network management protocols such as SNMP, gRPC telemetry uses the ‘push’ model to stream device data (such as statistics) from the network devices to the configured data collector(s). Collectors can then store, filter and analyze the collected data from the network devices. 

Starting from NetVisor OS release 7.0.2, a switch can act as gRPC client and the data collector as gRPC server. The network device initiates a gRPC connection to the collector and pushes subscribed data to it. This configuration is known as dial-out mode.

Note: The other telemetry mode, called dial-in mode, in which the switch acts as the server and the collector acts as the client, is not supported in NetVisor OS release 7.0.2.

Note: By default, the gRPC telemetry service streams fabric-wide data.

In NetVisor OS release 7.0.2 only connection-show data is supported for telemetry export: the gRPC client running on a network device fetches the connection-show data from all nodes in the fabric (or from a specified node) and streams it to the gRPC collectors encoded as protocol buffer (protocolbuf) messages.

Protocol buffers are used in gRPC as an Interface Definition Language (IDL) for describing both the service interface and the structure of the payload of the messages.

Below is an example of protocol buffer definition for telemetry data:

               syntax = "proto3";       // Current Protobuf version

               package telemetry;        //Give a package name

               service NetvisorTelemetry {

                       //Define remote methods to stream data

                       rpc PushConnections (stream Connection) returns (Result) {}


               // Define the message

               message Connection {  // Message Connection

                 string switch = 1 [json_name = "api.switch-name"];

                 uint32 sum_by_count = 2 [json_name = "count"];

                 string vnet = 3;

                 string br_dom = 4 [json_name = "bd"];

                 uint32 vlan = 5;

                 string egress_vnet = 6 [json_name = "egress-vnet"];





For more information on the protocol buffers technology, refer to the developer documentation: https://developers.google.com/protocol-buffers.