Navigation
Guide That Contains This Content
[+] Expand All
[-] Collapse All

    Understanding OpenConfig and gRPC on Junos Telemetry Interface

    Starting in Junos OS Release 16.1R3, you can use a set of remote procedure call (RPC) interfaces to configure the Junos Telemetry Interface and stream telemetry data using the gRPC framework. OpenConfig supports the use of vendor-neutral data models for configuring and managing multivendor networks. gRPC is an open source framework that provides secure and reliable transport of data.

    Note: OpenConfig for Junos OS and gRPC are supported only on MPCs on MX Series and on PTX Series routers starting with Junos OS Release 16.1R3.

    Starting with Junos OS Release 17.2R1, OpenConfig and gRPC are also supported on QFX10000 switches, QFX5200 switches, and PTX1000 routers.

    Starting with Junos OS Release 17.3R1, Junos Telemetry Interface is supported on the Routing Control and Board (RCB) on PTX3000 routers, QFX5110 switches, and EX4600 and EX9200 switches.
    OpenConfig and gRPC are not supported on MX80 and MX104 routers.

    Network Agent Software

    Implementing OpenConfig with gRPC for Junos Telemetry Interface requires that you download and install a package called Network Agent if your Juniper Networks device is running a version of Junos OS with Upgraded FreeBSD. For all other versions of Junos OS, the Network Agent functionality is embedded in the software. Network Agent functions as a gRPC server and terminates the OpenConfig RPC interfaces. It is also responsible for streaming the telemetry data according to the OpenConfig specification. To view the OpenConfig specification for telemetry, see the OpenConfig Telemetry specification. For more information about OpenConfig for Junos OS, see the OpenConfig Feature Guide.

    The Network Agent component also supports server-based Secure Sockets Layer (SSL) authentication. Client-based SSL authentication is not supported. You must install SSL certificates on your Juniper Networks device.

    For information about installing the Network Agent package, see Installing the Network Agent Package.

    Using OpenConfig for Junos OS to Enable Junos Telemetry Interface

    OpenConfig for Junos OS specifies an RPC model to enable the Junos Telemetry Interface. You must download and install the OpenConfig for Junos OS package and YANG Models on your Juniper Networks device. Using a Web browser, navigate to the All Junos Platforms software download URL on the Juniper Networks webpage: https://www.juniper.net/support/downloads/. From the Network Management tab, scroll down to select OpenConfig. Select the Software tab. Select the appropriate version of OpenConfig module. Two versions are available, one for devices running Junos OS with Upgraded FreeBSD and another for devices running all other versions of Junos OS. Select YANG Models. For more information, see Installing the OpenConfig Package , Understanding Junos OS YANG Modules and Using Juniper Networks YANG Modules.

    The programmatic interface OpenConfigTelemetry that is installed by the Network Agent package defines the telemetry gRPC service. The telemetrySubscribe RPC specifies the following subscription parameters:

    • OpenConfig path that identifies the system resource to stream telemetry data, for example:
      /interfaces/interface/state/counters/
    • Interval at which data is reported and streamed to the collector server, in milliseconds, for example:
      sample_frequency = 4000

    The telemetrySubscribe RPC is used by a streaming server, or collector, to request an inline subscription for data at the specified path. The device should then send telemetry data back on the same connection as the subscription request.

    Using gRPC to Stream Data

    Per the OpenConfig specification, only gRPC-based transport is supported for streaming data. The gRPC server that is installed by the Network Agent package terminates the gRPC sessions from the management system that runs the client. RPC calls trigger the creation of Junos OS sensors that either stream data periodically or report events, which are then funneled onto the appropriate gRPC channel by Network Agent.

    See Table 1 for a list and descriptions of the RPCs implemented to the support the Junos Telemetry Interface.

    Table 1: Telemetry RPCs

    RPC Name

    Description

    telemetrySubscribe

    Specify telemetry parameters and stream data for the specified list of OpenConfig paths.

    getTelemetrySubscriptions

    Retrieve the list of subscriptions that are created through telemetrySubscribe.

    cancelSubscription

    Unsubscribe a subscription created through telemetrySubscribe.

    Data streamed through gPRC is formatted in OpenConfig key/value pairs in Google protocol buffers (gpb) messages. In this universal format, keys are strings that correspond to the path of the system resources in the OpenConfig schema for the device being monitored. The values correspond to integers or strings that identify the operational state of the system resource, such as interface counters, and the state of a resource.

    The following shows the universal key/value format:

    message KeyValue {
        string key        = 1 [(telemetry_options).is_key = true];
        uint64 int_value  = 2;  
        string str_value  = 3;
        string prefix_str = 4;
    }
    
    message TelemetryStream {
        // router name or export IP address    
        required string system_id     = 1 [(telemetry_options).is_key = true];
        
        // line card / RE (slot number)
        optional uint32 component_id  = 2 [(telemetry_options).is_key = true];
        
       // PFE (if applicable)
        optional uint32 sub_component_id = 3 [(telemetry_options).is_key = true];
       
       // timestamp (common to all entries in the kv array)
        optional uint64 timestamp     = 4 [(telemetry_options).is_timestamp = true];
      
        // key / value pairs
        repeated KeyValue kv;
    }
    

    The following example shows how a set of counters for an interface can be represented:

    key = “/interfaces/counters/rx-bytes”,     int_value = 1000
    key = “/interfaces/counters/tx-bytes”,     int_value = 2000
    key = “/interfaces/counters/rx-packets”, int_value = 10
    key = “/interfaces/counters/rx-bytes” ,    int_value = 20
    key = “/interfaces/counters/oper-state”, str_value = “up”
    

    The Network Agent package provides a mapping table that maps field names to the OpenConfig key strings.

    Release History Table

    Release
    Description
    Starting with Junos OS Release 17.3R1, Junos Telemetry Interface is supported on the Routing Control and Board (RCB) on PTX3000 routers, QFX5110 switches, and EX4600 and EX9200 switches.
    Starting with Junos OS Release 17.2R1, OpenConfig and gRPC are also supported on QFX10000 switches, QFX5200 switches, and PTX1000 routers.
    Starting in Junos OS Release 16.1R3, you can use a set of remote procedure call (RPC) interfaces to configure the Junos Telemetry Interface and stream telemetry data using the gRPC framework.
    OpenConfig for Junos OS and gRPC are supported only on MPCs on MX Series and on PTX Series routers starting with Junos OS Release 16.1R3.

    Modified: 2017-09-13