ON THIS PAGE
Using OpenConfig for Junos OS to Enable Junos telemetry interface
Delivery of Telemetry Data for AFT-Based Line Cards on MX Series Routers
Enabling Client Streaming and Bidirectional Streaming of Telemetry Sensor Information
Enabling Streaming of Telemetry Sensor Information for SR-TE policies (BGP or Static)
JTI Broadband Edge Statistics Support for Junos Fusion on MX Series
CPU and NPU Sensor Support for MX Series Routers with MPC10E-15C-MRATE Line Cards
Diameter Application Protocol and Diameter Peer Sensors for Subscribers
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.
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.
Starting with Junos OS Release 17.4R1, MX2008 routers are supported.
Starting with Junos OS Release 18.3R1, ON_CHANGE streaming of LLDP telemetry sensor information is supported through gRPC for MX Series and PTX Series routers.
Starting with Junos OS Release 18.3R1, QFX5120-48Y and EX4650 switches are also supported.
Starting with Junos OS Release 18.4R1, EX4600 switches are also supported.
Starting with Junos OS Release 18.4R1, MX480, MX960, MX2010, MX2020, MX2008 and MX-ELM routers are also supported.
Starting with Junos OS Release 19.1R1, MX Series routers operating with MS-MIC and MS-MPC, QFX10002 switches, and PTX10002 routers are also supported.
Starting in Junos OS Evolved Release 19.1R1, OpenConfig (OC) and Junos telemetry interface (JTI) are supported. Both gRPC APIs and the customer-facing CLI remain the same as for the Junos OS. As was standard for Junos OS, Network Agent (NA) and OC packages are part of the Junos OS Evolved image.
Starting with Junos OS Evolved 19.1R1, Packet Forwarding Engine sensors on PTX10003 routers are also supported.
Starting with Junos OS Release 19.2R1, SRX4100, SRX4200, SRX4600, SRX5400, SRX5600, SRX5800, and vSRX Virtual Firewall Series Services Gateways.
Starting with Junos OS Release 19.2R1, gNMI services for streaming Packet Forwarding Engine statistics is supported on MX960, MX2008, MX2010 and MX2020 routers, PTX1000 and PTX10000 routers, and QFX5200 switches.
Starting with Junos OS Release 19.2R1, gNMI services for streaming statistics is supported on QFX5110, QFX5120, QFX5200 and QFX5210 switches.
Starting with Junos OS Release 19.3R1, gRPC service for exporting statistics is supported on MX Series routers hosting MPC10E-10C-MRATE and MPC10E-15C-MRATE line cards.
Starting with Junos OS Evolved Release 19.3R1, gRPC service for exporting statistics is supported on QFX5220-128C and QFX5220-32CD switches.
Starting with Junos Release 19.4R1, gRPC service for streaming Packet Forwarding Engine and Routing Engine statistics is supported on EX4300-MP switches.
JTI support for PTX10008 routers is documented for Junos OS Evolved Release 19.4R1, but not supported.
Starting with Junos Release 20.R1, gNMI service for streaming telemetry sensors for Packet Forwarding Engine statistics is supported on MX2K-MPC11E line cards on MX2010 and MX2020 routers.
Starting with Junos OS Release 20.1R1, gRPC services version v1.18.0 is supported with JTI. This version includes important enhancements for gRPC. In earlier Junos OS releases, gRPC version v1.3.0 is supported with JTI.
Starting with Junos OS Evolved Release 20.2R1, gRPC service for streaming NDP statistics is supported on PTX10001 routers.
Starting with Junos OS Release 20.2R1, gRPC service for streaming Packet forwarding Engine and Routing Engine statistics is supported on EX2300, EX2300-MP, and EX3400 switches.
Starting with Junos OS Release 20.2R1, gRPC service for streaming BGP routing information base (RIB) and BGP peer statistics is supported on any platform family that supports containerized routing protocol process (cRPD). cRPD is Juniper’s routing protocol process (rpd) decoupled from Junos OS and packaged as a Docker container to run in Linux-based environments.
Starting with Junos OS Release 20.2R1, ON_CHANGE BGP peer statistics export using gRPC services and gNMI services is supported on MX960, MX2008, MX2010, MX2020, PTX1000, PTX5000, PTX10000 routers and QFX5100 and QFX5200 switches.
Starting with Junos OS Release 20.2R1, streaming BGP global, peer and perr groups statistics using gRPC services is supported on EX2300, EX3400, EX4300, EX4600, and EX9200 switches.
Starting with Junos OS Release 20.2R1, streaming revenue interface statistics through Packet Forwarding Engine sensors and pseudo interface statistics through Routing Engine sensors using gRPC services and gNMI services is supported on SRX5400, SRX5600, and SRX5800 Services Gateways..
Starting with Junos OS Release 20.2R1, streaming revenue interface statistics through Packet Forwarding Engine sensors and pseudo interface statistics through Routing Engine sensors using gRPC services and gNMI services is supported on SRX5400, SRX5600, and SRX5800 Services Gateways.
Starting with Junos OS Release 20.2R1 sensors to stream standby Routing Engine statistics are supported on MX480, MX960, MX10003, MX2010, and MX2020 routers.
Starting with Junos OS Release 20.2R1 sensors to stream EVPN statistics using gRPC services are supported with QFX5100, QFX5110, QFX5120, QFX5200, QFX10002-60C, QFX10002, QFX10008, and QFX10016 switches.
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 User 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 on your Juniper Networks device. This package also includes the required YANG models.
You can locate all YANG data models in a GitHub repository for a given OS and release in a single download package. The package and repository include the native configuration, state, and RPC data models and the OpenConfig and IETF data models supported by that OS. You can also access the YANG data models from the Juniper Networks download site.
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. For more information, see Installing the OpenConfig Package and Understanding Junos OS 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.
GitHub Resources
GitHub is a code hosting platform for version control and collaboration. It lets you and others work together on projects from anywhere. Juniper Networks is part of the OpenConfig community that uses GitHub to develop telemetry code and store documents. Contribute to Juniper telemetry development by creating an account on GitHub.
Telemetry Resources |
Description |
---|---|
Juniper telemetry models, augments, and deviations. |
|
Juniper protocol buffer files, organized by Junos OS Release. |
|
Juniper gNMI protocol buffer files, organized by Junos OS Release.. |
|
YANG models | Starting in Junos OS Evolved Release 23.4R1, all YANG data models for a given OS and release are in a single download package and GitHub repository. The package and repository include the native configuration, state, and RPC data models and the OpenConfig and Internet Engineering Task Force (IETF) data models supported by that OS. |
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.
Starting in Junos OS
Release 18.2R1, when an external streaming server, or collector, provisions
sensors to export data through gRPC on devices running Junos OS, the
sensor configuration is committed to the junos-analytics
instance of the ephemeral configuration database, and the configuration
can be viewed by using the show ephemeral-configuration instance
junos-analytics
operational command. In earlier releases, the sensor configuration is committed to the
default instance of the ephemeral configuration database.
The Juniper telemetry header that was exported as part of updates is now exported as an extension header. GnmiJuniperTelemetryHeader.proto is used to decode the updates from Juniper devices running Junos OS Release 19.3 or earlier and GnmiJuniperTelemetryHeaderExtension.proto is used for devices running Junos OS Release 19.4 or later.
See Table 2 for a list and descriptions of the RPCs implemented to support the Junos telemetry interface.
RPC Name |
Description |
---|---|
|
Specify telemetry parameters and stream data for the specified list of OpenConfig paths. |
|
Retrieve the list of subscriptions that are created through |
|
Unsubscribe a subscription created through |
Data streamed through gRPC is formatted in OpenConfig key/value pairs in 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 the resource.
Starting in Junos OS Release 18.2R1, data streamed through gRPC can be formatted as protobuf in addition to key/value pairs for OpenConfig-based routing engine (RE) sensors. These sensors are in addition to the packet forwarding engine (PFE) sensors.
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.
Exporting Packet Forwarding Engine Traffic Sensor Data
Starting with Junos OS Release 17.4R1, you can export Packet Forwarding Engine traffic statistics through the Junos telemetry interface for MX Series and PTX Series routers. Both UDP and gRPC are supported.
This sensor tracks reporting of Packet Forwarding Engine statistics
counters and provides visibility into Packet Forwarding Engine error
and drop statistics. The resource name for the sensor is /junos/system/linecard/packet/usage/
. The OpenConfig paths report data specific to CPU, NPU and center
chip (CC). The following paths are supported:
/components/component[name='FPCid:NPUid']/properties/property[name='counter']/state/value
, where FPC refers to the Flexible PIC Concentrator and NPU refers to the network processing unit (packet forwarding engine). A sample resource path is/components/component[name='FPC0:NPU3']/properties/property[name='ts-output-pps']/state/value
wherehwds-data-error
is the counter forHardware Discards: Data Error
./components/component[name='FPCid:CCid’]/properties/property[name='counter’]/state/value
, where FPC refers to the Flexible PIC Concentrator and CC refers to the center chip. A sample resource path is/components/component[name='FPC0:CC1']/properties/property[name='lpbk-packets’']/state/value
wherelpbk-packets
is the count ofForward packets
specific to FPC0, center chip 1./components/component[name='FPCid’]/properties/property[name='counter’]/state/value
, where FPC refers to the Flexible PIC Concentrator. A sample resource path is/components/component[name='FPC0']/properties/property[name='lts-input-packets’']/state/value
wherelts-input-packets
is the CPU counterLocal packets input
.
To provision the sensor to export data through gRPC, use the telemetrySubcribe
RPC to specify telemetry parameters. For
streaming through UDP, all parameters are configured at the [edit
services analytics]
hierarchy level.
The following is a map of counters to output fields in the
show
pfe statistics traffic
command or show pfe
statistics traffic detail
command (supported only on MX Series
routers).
CPU stats: (FPCX:CPUY) Packet Forwarding Engine local traffic statistics: Local packets input : 2 Local packets output : 1 Software input control plane drops : 0 Software input high drops : 0 Software input medium drops : 0 Software input low drops : 0 Software output drops : 0 Hardware input drops : 0 Counter lts-input-packets Local packets input lts-output-packets Local packets output lts-sw-input-control-drops Software input control plane drops lts-sw-input-high-drops Software input high drops lts-sw-input-medium-drops Software input medium drops lts-sw-input-low-drops Software input low drops lts-sw-output-low-drops Software output drops NPU stats: (FPCX:CCY) Input packets: 1169 0 pps Output packets: 0 0 pps Fabric Input : 277235149 16078 pps Fabric Output : 277235149 16079 pps Counter ts-input-packets Input packets ts-input-packets-pps Input packets in pps ts-output-packets Output packets ts-output-packets-pps Output packets in pps ts-fabric-input-packets Fabric Input ts-fabric-input-packets-pps Fabric Input in pps ts-fabric-output-packets Fabric Output ts-fabric-output-packets-pps Fabric Output in pps Packet Forwarding Engine loopback statistics: Forward packets : 0 0 pps Forward bytes : 0 0 bps Drop packets : 0 0 pps Drop bytes : 0 0 bps Counter lpbk-packets Forward packets lpbk-packets-pps Forward packets pps lpbk-packets-byte Forward bytes lpbk-packets-bps Forward bytes bps lpbk-drop-packets Drop packets lpbk-drop-packets Drop packets pps lpbk-drop-packets Drop bytes lpbk-drop-packets Drop bytes bps Lu chips stats: FPCx:NPUY Counter lts-hw-input-drops hwds-normal Hardware discards normal discard hwds-fabric Hardware discards fabric drops hwds-info-cell Hardware discards info cell drops hwds-timeout Hardware discards timeour hwds-truncated-key Hardware discards truncated key hwds-bits-to-test Hardware discards bits to test hwds-stack-underflow Hardware discards stack underflow hwds-stack-overflow Hardware discards stack overflow hwds-data-error Hardware discards data error hwds-extended Hardware discards extended discard hwds-invalid-iif Hardware discards invalid interface hwds-input-checksum Hardware discards input checksum hwds-output-mtu hwds-inet-bad-route hwds-inet6-bad-route hwds-filter-discard hwds-dlu-not-routable
Delivery of Telemetry Data for AFT-Based Line Cards on MX Series Routers
Starting with Junos OS Release 20.4R1, a new concatenation of prefix and key delivery for telemetry is implemented for Modular Port Concentrator (MPC) line cards supporting Abstract Forwarding Table (AFT) (such as MPC10E or MPC11E line cards). The OpenConfig path is split in a different manner as compared to the syntax on other line cards.
The output that follows illustrates the changes in prefix and key delivery.
Example jtimon output for a port on non-AFT LC key: __prefix__ str_value: /junos/firewall[name='CORERO-MITIGATE-xe-1/0/0.4051-i']/state/ key: counter[name='Corero-Allowed-xe-1/0/0.4051-i']/packets uint_value: 2935220 <<RESULT>> path: /junos/firewall[name='CORERO-MITIGATE-xe-1/0/0.4051-i']/state/counter[name='Corero-Allowed-xe-1/0/0.4051-i']/packets uint_value: 2935220 Example jtimon output for a port on an AFT LC key: __prefix__ str_value: /junos/firewall[name='CORERO-MITIGATE-et-2/0/0.114-i']/state/counter[name='Corero-Allowed-et-2/0/0.114-i']/ key: packets uint_value: 29191907 <<RESULT>> path: /junos/firewall[name='CORERO-MITIGATE-et-2/0/0.114-i']/state/counter[name='Corero-Allowed-et-2/0/0.114-i']/packets uint_value: 29191907
Enabling “ON CHANGE” Sensor Support Through gNMI
Periodical streaming of OpenConfig operational states and counters has been supported since Junos OS Release 16.1, exporting telemetry data from Juniper equipment to an external collector. While useful in collecting all the needed information and creating a baseline “snapshot,” periodical streaming is less useful for time-critical missions. In such instances, you can configure ON_CHANGE streaming for an external collector to receive information only when operational states experience a change in state.
To support ON_CHANGE streaming, a new specification called gRPC Network Management Interface (gNMI) is implemented for the modification and retrieval of configurations from a network element. Additionally, the gNMI specification can be used to generate and control telemetry streams from a network element to a data collection system. Using the new gNMI specification, one gRPC service definition can provide a single implementation on a network element for both configuration and telemetry as well as a single NMS element to interact with a device by means of telemetry and configuration RPCs.
The Junos file package (junos-telemetry-interface) includes the gnmi.proto file and GnmiJuniperTelemetryHeader.proto Juniper extension for gNMI support.
Information about the RPCs supporting this feature can be found in the gNMI Proto file version 0.4.0 (the supported version) and the specification released
https://github.com/openconfig/reference/blob/primary/rpc/gnmi/gnmi-specification.md
https://github.com/openconfig/gnmi/blob/primary/proto/gnmi/gnmi.proto
The telemetry RPC subscribe
under gNMI service supports
ON_CHANGE streaming. RPC subscribe
allows a client to request
the target to send it values of particular paths within the data
tree. Values may be streamed (STREAM), sent one-off on a long-lived
channel (POLL), or sent one-off as a retrieval (ONCE).
If a subscription is made for a top level container with a sample frequency of 0, leaves with ON_CHANGE support are streamed based on events. Other leaves will not be streamed.
In order to permit a device to decide which nodes will be streamed as ON_CHANGE and which will SAMPLE, the collector must subscribe for TARGET_DEFINED with sample_interval.
Enabling “TARGET_DEFINED” Subscription Mode through gNMI
Starting with Junos OS Release 20.2R1, TARGET_DEFINED subscription mode with gRPC Network Management Interface (gNMI) services is supported for JTI on MX5, MX10, MX40, MX80, MX104, MX150, MX204, MX240, MX480, MX960, MX2008, MX2010, MX2020, MX10003, MX10008, and MX10016 routers.
Using a gNMI subscription, an external collector stipulates how sensor data should be delivered:
STREAMING mode periodically streams sensor data from the DUT at a specified interval.
ON_CHANGE mode sends updates for sensor data from the DUT only when data values change.
Newly supported TARGET_DEFINED mode (submode 0) instructs the DUT to select the relevant mode (STREAMING or ON_CHANGE) to deliver each element (leaf) of sensor data to the external collector. When a subscription for a sensor with submode 0 is sent from the external collector to the DUT, the DUT responds, activating the sensor subscription so that periodic streaming does not include any of the ON_CHANGE updates. However, the DUT will notify the collector whenever qualifying ON_CHANGE events occur.
Subscriptions will default to a periodic streaming frequency of 30 seconds unless otherwise specified by the collector in the subscription request.
The Java Script Object Notification (JSON) file below shows
a sample gNMI subscription. TARGET_DEFINED mode is set using submode=0
for the resource (sensor) path /interfaces/interface[name='lo0']/state.
$ cat gnmi.json { "dut_list":[ { "port":32767, "rpc":["sub_request"], "sub_request":{ "subscription":[ { "path":"/interfaces/interface[name='lo0']/state", "submode":0, "sample_interval":30 } ], "mode":0, "encoding":2 } } ] $ python ./gnmi_subscribe_client_sample.py -c ./gnmi.json -d 10.53.32.102 -l client.log
The Junos file package (junos-telemetry-interface) includes the gnmi.proto file and GnmiJuniperTelemetryHeader.proto Juniper extension for gNMI support.
For more information, see the gNMI specifications and gNMI protocol file here:
Enabling “INITIAL_SYNC” Subscription Mode through gNMI
Starting in Junos OS Release 20.2R1, INITIAL_SYNC statistics from Packet Forwarding Engine sensors using gNMI services on MX960, MX2008, MX2010, MX2020, PTX1000, PTX5000 routers, PTX10000 line of routers, and QFX5100 and QFX5200 switches is supported.
Starting in Junos OS Evolved Release 20.4R1, INITIAL_SYNC statistics from Packet Forwarding Engine sensors using gNMI services on QFX5130-32CD switches is supported.
When an external collector sends a subscription request for a sensor with INITIAL_SYNC (gnmi-submode 2), the host sends all supported target leaves (fields) under that resource path at least once to the collector with the current value. This is valuable because:
The collector has a complete view of the current state of every field on the device for that sensor path.
Event-driven data (ON_CHANGE) is received by the collector at least once before the next event is seen. In this way, the collector is aware of the data state before the next event happens.
Packet Forwarding Engine sensors that contain zero counter values (zero-suppressed) that normally do not show up in streamed data are sent, ensuring that all fields from each line card (also referred to as source) are known to the collector.
INITIAL_SYNC submode requires that at least one copy to be sent to the collector; however, sending more than one is acceptable.
Subscriptions will default to a periodic streaming frequency of 30 seconds unless otherwise specified by the collector in the subscription request.
The Java Script Object Notification (JSON) file below shows
a sample gNMI subscription. INITIAL_SYNC mode is set using gnmi_submode
2
for the resource (sensor) path /interfaces/. The gnmi_mode
is set to 0
. The protocol encoding
is set to 2
for GBP.
{ "influx": { "server": "server1", "port": 8086, "dbname": "gD40", "measurement": "OC", "user": "influx", "password": "influxdb", "recreate": true }, "gnmi": { "mode": 0, <---- STREAM "encoding": 2, <--- PROTO encoding "prefix": "/x/y/z" }, "host": "10.10.130.73", "port": 10162, "user": "user1", "password": "password1", "cid": "cid-1jk", "paths":[ { "path": "/interfaces/", "Freq": 10000000000, "gnmi_submode": 2 <---- SAMPLE } ] }
The Junos file package (junos-telemetry-interface) includes the gnmi.proto file and GnmiJuniperTelemetryHeader.proto Juniper extension for gNMI support.
For more information, see the gNMI specifications and gNMI protocol file here:
gNMI telemetry specification gNMI protocol definition
https://github.com/openconfig/reference/blob/primary/rpc/gnmi/gnmi-specification.md#35152-stream-subscriptions
https://github.com/openconfig/gnmi/blob/primary/proto/gnmi/gnmi.proto
Enabling Client Streaming and Bidirectional Streaming of Telemetry Sensor Information
Starting with Junos OS Release 18.1R1, OpenConfig support through Remote Procedure Calls (gRPC) and JTI is extended to support client streaming and bidirectional streaming of telemetry sensor information on MX Series and PTX Series routers.
APIs are implemented in Junos based on Protobuf specifications for OpenConfig. These APIs perform configuration, operational state retrieval, and telemetry on Junos routers using gRPC as the transport mechanism.
With client streaming, the client sends a stream of requests to the server instead of a single request. The server typically sends back a single response containing status details and optional trailing metadata. With bidirectional streaming, both client and server send a stream of requests and responses. The client starts the operation by invoking the RPC and the server receives the client metadata, method name, and deadline. The server can choose to send back its initial metadata or wait for the client to start sending requests. The client and server can read and write in any order. The streams operate completely independently.
Junos devices can be managed through API (RPC) prototypes:
rpc Capabilities (CapabilityRequest)
Returns (CapabilityResponse). Allows the client to retrieve the set of capabilities that is supported by the target.
rpc Get (GetRequest)
Returns (GetResponse). Retrieves a snapshot of data from the target.
rpc Set (SetRequest)
Returns (SetResponse). Allows the client to modify the state of data on the target.
rpc Subscribe (stream SubscribeRequest)
Returns (stream SubscribeResponse). Allows a client to request the target to send it values for particular paths within the data tree. These values may be streamed (STREAM) or sent one-off on a long-lived channel (POLL), or sent as a one-off retrieval (ONCE). If a subscription is made for a top-level container with a sample frequency of 0, leaves with ON_CHANGE support are streamed based on events. Other leaves will not be streamed.
Juniper Extension Toolkit (JET) support provides insight to
users regarding the status of clients connected to JSD. JET support
for gRPC includes expanding the maximum number of clients that can
connect to JSD from 8 to 30 (the default remains 5). To specify the
maximum number of connections, include the max-connections
statement at the [edit system services extension-service request-response
grpc
] hierarchy level.
To provide information regarding the status of clients connected
to JSD, issue the enhanced show extension-service client information
command and include the clients
or servers
options. The clients
option displays request-response
client information. The servers
option displays request-response
server information.
Enabling Streaming of Telemetry Sensor Information for SR-TE policies (BGP or Static)
Starting with Junos OS Release 18.3R1, OpenConfig support for MX Series and PTX Series through gRPC and JTI provides continuous statistics streaming via the same sensor irrespective of the route that is active (BGP or static) for a given Segment Routing Traffic Engineering (SR-TE) policy.
Support is available in Junos OS Evolved Release 21.4R1EVO for PTX10001-36MR, PTX10004, PTX10008, and PTX10016 routers.
This feature provides support for BGP [DRAFT-SRTE] and statically configured SR-TE policies at ingress routers.
To provision the sensor to export data through gRPC streaming,
use the telemetrySubscribe RPC to specify telemetry parameters. Include
the resource path /mpls/signaling-protocols/segment-routing/
to export these statistics.
In addition to configuring the sensor, you must enable statistics
collection through the Junos OS. To do this, include the statistics
configuration statement at the [edit protocols source-packet-routing telemetry
] hierarchy level. Optionally, you can limit statistics by including
the no-transit
or no-ingress
parameter.
See Configure a NETCONF Proxy Telemetry Sensor in Junos for instructions on configuring a sensor.
See Guidelines for gRPC and gNMI Sensors (Junos Telemetry Interface) for further information about resource paths.
Support for LSP Statistics
You can provision the LSP statistics sensor /junos/services/label-switched-path/usage/ to monitor per-MPLS LSP statistics. Telemetry data is streamed from Junos devices and exported through JTI to external collectors at configurable intervals through gRPC without involving polling.
Initial support of this feature in Junos OS Release 15.1F6 supported ingress LSPs only when a subscription was made to /junos/services/label-switched-path/usage/. With bypass support added to this feature in Junos OS Release 17.4R1, this subscription now streams both ingress LSP and bypass LSP statistics to a collector.
Statistics that are streamed are similar to the output displayed
by the operational mode commands show mpls lsp bypass statistics
and show mpls lsp ingress statistics
.
For bypass LSPs, the following are exported:
Bypass LSP originating at the ingress router of the protected LSP.
Bypass LSP originating at the transit router of the protected LSP.
Bypass LSP protecting the transit LSP as well as the locally originated LSP.
When the bypass LSP is active, traffic is exported both on the bypass LSP and the ingress (protected) LSP.
To provision a sensor to export data through gRPC, use the telemetrySubscribe RPC to specify telemetry parameters. Streaming telemetry data through gRPC also requires the OpenConfig for Junos OS module. Both OpenConfig and Network Agent packages are bundled into the Junos OS image by default.
See Configuring a Junos Telemetry Interface Sensor (CLI Procedure) for information about configuring a UDP (native) sensor.
See Table 3 for the level of LSP sensor support by platform.
Platform |
Ingress LSP, UDP Feature Introduced |
Ingress LSP, gRPC Streaming Feature Introduced |
Bypass LSP Feature Introduced |
---|---|---|---|
ACX6360 |
Junos 19.2R1 RSVP bypass LSP originating at transit node |
||
MX80/MX104 |
Junos OS Release 15.1F6 Junos OS Release 16.1R3 Junos OS Release 17.2R1 |
Junos OS Release 17.4R1 Junos OS Release 17.2X75D50+ |
|
MX Series with MPC |
Junos OS Release 15.1F6 |
Junos OS Release 16.1R4 Junos OS Release 17.2R1 |
Junos OS Release 17.4R1 Junos OS Release 17.2X75D50+ |
PTX5000 with FPC3 |
Junos OS Release 18.2R1 |
Junos OS Release 17.4R1 |
|
PTX3000 with FPC3 |
Junos OS Release 15.1F6 Junos OS Release 16.1R3 Junos OS Release 17.2R1 |
Junos OS Release 16.1R4 Junos OS Release 17.2R1 Junos OS Release 18.2R1 |
Junos OS Release 17.4R1 Junos OS Release 17.2X75D50+ |
PTX Series with FPC1/2 |
Junos OS Release 15.1F6 Junos OS Release 16.1R3 Junos OS Release 17.2R1 |
Junos OS Release 16.1R4 Junos OS Release 17.2R1 Junos OS Release 18.2R1 |
Junos OS Release 17.4R1 Junos OS Release 17.2X75D50+ |
PTX1000 |
Junos OS Release 16.1R3 |
Junos OS Release 16.1R4 Junos OS Release 17.2R1 |
Junos OS Release 17.4R1 Junos OS Release 17.2X75D50+ |
PTX10000 |
Junos OS Release 17.3R1 |
Junos OS Release 17.3R1 |
Junos OS Release 17.4R1 Junos OS Release 17.2X75D50+ |
PTX10001-20C |
Junos OS Release 19.1R1 RSVP bypass LSP originating at transit node |
||
PTX10002 |
Junos OS Release 19.1R1 |
Junos OS Release 19.1R1 |
|
VMX |
Junos OS Release 17.3R1 |
Junos OS Release 17.3R1 |
Junos OS Release 17.4R1 Junos OS Release 17.2X75D50+ |
MX150 |
Junos OS Release 17.4R1 |
Junos OS Release 17.4R1 |
|
EX4600 |
Junos OS Release 18.4R1 |
||
EX4650 |
Junos OS Release 18.3R1 |
Junos OS Release 18.3R1 |
|
EX9200 |
Junos OS Release 17.3R1 |
||
QFX10000 |
|||
QFX5200 |
Junos OS Release 17.2R1 |
Junos OS Release 17.2R1 |
|
QFX10002 |
Junos OS Release 19.1R1 |
Junos OS Release 19.1R1 |
|
QFX5100 |
Junos OS Release 18.2R1 |
Junos OS Release 18.2R1 |
|
QFX5110 |
Junos OS Release 18.2R1 |
Junos OS Release 18.2R1 |
|
QFX5120-48Y |
Junos OS Release 18.3R1 |
Junos OS Release 18.3R1 |
|
QFX5200 |
Junos OS Release 18.2R1 |
Junos OS Release 18.2R1 |
End-of-Message Notification for Routing Engine Sensors
Starting in Junos OS Release 21.2R1, we've introduced an end-of-message (EoM) Boolean flag for all JTI Routing Engine sensors. The flag notifies the collector that the current wrap has completed for a particular sensor path. A wrap is a complete key-value data dump for all the leaves under a sensor path.
The EoM flag also enables the collector to detect when the end of wrap occurs without having to compare stream creation timestamp values that the collector receives from the packets. Comparing timestamp values is costly time-wise and delays data aggregation.
To use this feature with gRPC Network Management Interface (gNMI) transport or Remote Procedure Call (gRPC), retrieve the protobuf files from the relevant branch on the Juniper Networks download site:
- GnmiJuniperTelemetryHeaderExtension.proto (gNMI)
- agent.proto (for gRPC)
For example: https://github.com/Juniper/telemetry/blob/master/20.3/20.3R1/protos/GnmiJuniperTelemetryHeaderExtension.proto.
After you download and install the new protobuf files on a collector, the EoM field is present in the packets received.
Dynamic Tunnel Statistics Support
Starting with Junos OS Release 17.4R1, you can export counter statistics for Packet Forwarding Engine dynamic tunnels to an outside collector using either native (UDP) or OpenConfig telemetry sensors through JTI.
The statistics are used to report various network element performance metrics in a scalable and efficient way, providing visibility into Packet Forwarding Engine errors and drops.
A timestamp indicating when the counters were last reset is included with all the exported data to allow collectors to determine if and when a reset event happened; for example, if the P acket Forwarding Engine hardware restarted.
Exported statistics are similar to the output of the operational
mode command show nhdb hw dynamic-ip-tunnels
.
To provision statistics export through gRPC, use the telemetrySubcribe RPC to create a subscription and specify telemetry parameters. Include the resource path /junos/services/ip-tunnel[name='tunnel-name']/usage/counters[name='counter-name']/ in the subscription.
Streaming telemetry data through gRPC also requires the OpenConfig for Junos OS module. Starting in Junos OS Release 18.3R1, OpenConfig and Network Agent packages are bundled into the Junos OS image by default. Both packages support JTI.
To configure export of statistics through UDP, include the sensor /junos/services/ip-tunnel/usage/
in the sensor (Junos Telemetry Interface) configuration
statement at the [edit services analytics
] hierarchy level.
All parameters for UDP sensors are configured at that hierarchy level.
MX80 and MX104 routers support only UDP streaming. They do not support
gRPC.
FPC and Optics Support
Starting in Junos OS Release 19.2R1, JTI supports streaming of Flexible PIC Concentrator (FPC) and optics statistics for the MX Series using Remote Procedure Calls (gRPC). gRPC is a protocol for configuration and retrieval of state information. Support includes the addition of a new process (SensorD daemon) to export telemetry data for integration with AFTTelementry and LibTelemetry libraries in the OpenConfig model called AFT platform.
The following base resource paths are supported:
/junos/system/linecard/environment/
/junos/system/linecard/optics/
To provision the sensor to export data through gRPC, use the telemetrySubcribe RPC to specify telemetry parameters. Streaming telemetry data through gRPC also requires the OpenConfig for Junos OS module. Starting in Junos OS Release 18.3R1, OpenConfig and Network Agent packages are bundled into the Junos OS image by default. Both packages support JTI.
JTI Broadband Edge Statistics Support for Junos Fusion on MX Series
Starting in Junos OS Release 19.2R1, subscriber-based telemetry streaming is enabled when an MX router is configured for Broadband Network Gateway (BNG) and Junos Fusion where subscribers are connected through Junos Fusion Satellite devices. You can use remote procedure calls (gRPC) to export broadband edge (BBE) telemetry statistics to external collectors.
You can stream all BBE resource paths except for the following:
/junos/system/subscriber-management/access-network/ancp
/junos/system/subscriber-management/client-protocols/l2tp
/junos/system/subscriber-management/infra/network/l2tp/
To stream BBE statistics, include a resource path starting with /junos/system/subscriber-management/ in your gRPC subscription.
To provision the sensor to export data through gRPC, use the telemetrySubscribe
RPC to specify telemetry parameters.
CPU and NPU Sensor Support for MX Series Routers with MPC10E-15C-MRATE Line Cards
Junos OS Release 19.3R1 supports CPU and network processing unit (NPU) sensors on MX Series routers with MPC10E-10C-MRATE and MPC10E-15C-MRATE line cards. JTI enables the export of statistics from these sensors to outside collectors at configurable intervals using gRPC services.
Unlike the Junos kernel implementation for the CPU and NPU sensors in previous Junos releases, this feature uses the OpenConfig AFT model. Because of this, there is a difference in the resource path and key-value (kv) pair output compared to the Junos kernel output.
Use the following resource path to export statistics:
/junos/system/linecard/cpu/memory/
/junos/system/linecard/npu/memory/
/junos/system/linecard/npu/utilization/
To provision the sensor to export data through gRPC services,
use the telemetrySubcribe
RPC to specify telemetry parameters.
Streaming telemetry data through gRPC also requires the OpenConfig
for Junos OS module. Starting
in Junos OS Release 18.3R1, OpenConfig and Network Agent packages
are bundled into the Junos OS image by default. Both packages support
JTI.
For more information about gRPC resource paths, see Guidelines for gRPC Sensors (Junos Telemetry Interface).
Interface Express Sensor
The interface express sensor is supported by JTI to export interface
operational UP
and DOWN
status at a user-configurable
rate. This sensor leverages statistics out of the physical interface
sensor, providing faster and more frequent operational status statistics.
Only the physical interfaces’ operational status from the Flexible
PIC Concentrator (FPC) is collected and reported. Statistics from
the Routing Engine interface are not reported.
You can use the sensor to export statistics either through UDP (native) export or through gRPC services.
For either export method, include the following resource path:
/junos/system/linecard/intf-exp/
Junos OS Release 18.1R1 supports interface express sensor for PTX1000, PTX3000, PTX5000, and PTX10000 routers.
Junos OS Release 19.3R1 supports interface express sensor for MX960, MX2010, and MX2020 routers.
For more information about gRPC resource paths, see Guidelines for gRPC and gNMI Sensors (Junos Telemetry Interface).
Standby Routing Engine Sensors for Subscribers
JTI supports streaming standby Routing Engine statistics using gRPC services. This feature is supported on both single chassis and virtual chassis unless otherwise indicated. Use this feature to better track the state of software components running on a standby Routing Engine. Statistics exported to an outside collector through the following sensors (primarily under subscriber management) provide a more complete view of the system health and resiliency state:
Chassis role (backup or primary) sensor /junos/system/subscriber-management/chassis and /junos/system/subscriber-management/chassis[chassis-index=chassis-index] (for specifying an index for an MX Series Virtual Chassis)
Routing Engine status and GRES notification sensor /junos/system/subscriber-management/chassis/routing-engines/routing-engine and /junos/system/subscriber-management/chassis/routing-engines/routing-engine[re-index=RoutingEngineIndex] (to specify an index number for a specific Routing Engine)
Subscriber management process sensor /junos/system/subscriber-management/chassis/routing-engines/process-status/subscriber-management-processes/subscriber-management-process and /junos/system/subscriber-management/chassis/routing-engines/process-status/subscriber-management-processes/subscriber-management-process[pid=ProcessIdentifier] (to specify a PID for a specific process)
Per Routing Engine DHCP binding statistics for server or relay sensor /junos/system/subscriber-management/chassis/routing-engines/routing-engine/dhcp-bindings/dhcp-element[dhcp-type-name=RelayOrServer/v4] and /junos/system/subscriber-management/chassis/routing-engines/routing-engine/dhcp-bindings/dhcp-element[dhcp-type-name=RelayOrServer/v6]
Virtual Chassis port counter sensor /junos/system/subscriber-management/chassis/virtual-chassis-ports/virtual-chassis-port and /junos/system/subscriber-management/chassis/virtual-chassis-ports/virtual-chassis-port[vcp-interface-name=vcp-interface-port-string] (to specify the interface name). This resource path is only supported on a virtual chassis.
Junos OS Release 20.2R1 supports standby Routing Engine sensors for MX480, MX960, MX10003, MX2010, and MX2020 routers.
For more information about gRPC and gNMI resource paths, see Guidelines for gRPC and gNMI Sensors (Junos Telemetry Interface).
Diameter Application Protocol and Diameter Peer Sensors for Subscribers
JTI supports streaming statistics for subscribers for the diameter application protocols Network Access Server Application (NASREQ), policy and charging rules function (PCRF), and Online Charging System (OCS). There are also new diameter peer sensors that provide response time measurements for messages exchanged between an MX router and the peer for each of the diameter applications. Statistics are exported using JTI and the Juniper AAA Model, which covers telemetry export using gRPC, gNMI, or Juniper proprietary RPC or UDP.
To stream diameter application statistics, include the resource paths:
For NASREQ statistics, /junos/system/subscriber-management/aaa/diameter/clients/nasreq
For PCRF statistics, /junos/system/subscriber-management/aaa/diameter/clients/gx
For OCS statistics, /junos/system/subscriber-management/aaa/diameter/clients/gy
To stream response time measurements for the diameter applications,
include the resource paths in a subscription or using the sensor
configuration statement:
For NASREQ measurements, /junos/system/subscriber-management/aaa/diameter/peers/peer[peer_address=’peer-address’]/nasreq/response-time
For PCRF measurements, /junos/system/subscriber-management/aaa/diameter/peers/peer[peer_address=’peer-address’]/gx/response-time
For OCS measurements, /junos/system/subscriber-management/aaa/diameter/peers/peer[peer_address=’peer-address’]/gy/response-time
To enable these statistics for an MX Series router for native
(UDP) export, include the sensors
statement at the [edit services analytics
] hierarchy level.
To provision the sensor to export data through gNMI, use the Subscribe RPC defined in the gnmi.proto to specify request parameters.
To provision the sensor to export data through gRPC, use the telemetrySubscribe
RPC to specify telemetry parameters. Streaming
telemetry data through gRPC also requires the OpenConfig for Junos
OS module. Starting in Junos
OS Release 18.3R1, OpenConfig and Network Agent packages are bundled
into the Junos OS image by default. Both packages support JTI.
Junos OS Release 19.3R1 supports diameter application protocol sensors for MX5, MX10, MX40, MX150, MX204, MX240, MX480, MX960, MX2008, MX2010, MX2020, MX10003, MX10008, and MX100016 routers.
For more information about gRPC and gNMI resource paths, see Guidelines for gRPC and gNMI Sensors (Junos Telemetry Interface).
Interface Burst Monitoring
Junos OS Evolved Release 19.3R1supports interface burst monitoring on Junos telemetry interface (JTI) to monitor physical interfaces for bursts on QFX5220-128C and QFX5220-32CD switches. Use interface burst monitoring to help troubleshoot problems, make decisions, and adjust resources as needed.
The sampling is done in the millisecond granularity during the export interval (window). The export interval is configured in the sensor with the subscription from the collector. When the sensor is installed, a timer is started in the Packet Forwarding Engine to poll the hardware in 30-100ms intervals. Rates in the first export batch will be 0.
The peak byte is the average of the number of bytes seen in a sampling interval. For bursts lasting less than the sampling interval, the peak byte is averaged out over the interval. Exported statistics also include the time peak bytes are detected, as well as the direction (transmit or receive). The maximum byte rate detected during the export interval among all the samples is considered as the burst. If there are multiple bursts of the same number of bytes rate in the interval, then the first occurring burst is considered as the maximum burst and the timestamp of that burst is considered as the burst timestamp.
Data for all physical interfaces that are UP is exported. Aggregate interfaces are not supported.
You can export interface burst statistics from the Juniper device to an outside collector by including the sensor /junos/system/linecard/bmon-sw/ in a subscription using remote procedure call (gRPC) services. Only one collector is supported with this sensor.
To provision the sensor to export data through gRPC services,
use the telemetrySubcribe
RPC to specify telemetry parameters.
Streaming telemetry data through gRPC also requires the OpenConfig
for Junos OS module.
This feature does not detect microbursts.
Transceiver Diagnostics
Junos OS Release 19.4R1 supports transciever diagnostic sensors for ON_CHANGE and streaming statistics using JTI and gRPC services or gNMI services on MX960, MX2010, MX2020, PTX1000, PTX5000, and the PTX10000 line of routers. Use transceiver diagnostics to help troubleshoot problems, make decisions, and adjust resources as needed.
This feature supports OpenConfig transceiver model openconfig-platform-transceiver.yang 0.5.0.
Use the base resource path /components/component/transceiver/ in a gRPC or gNMI subscription to export statistics from the Juniper device to an outside collector.
Fields that change continuously, such as temperature, input power, and output power, and laser bias current are not supported for ON_CHANGE.
Physical Ethernet Interface Sensor
Junos OS Release 19.4R1 supports physical Ethernet interface statistics for ON_CHANGE and streaming statistics using JTI and gRPC services or gNMI services on MX960, MX2020, PTX1000, and PTX5000 routers.
This feature supports OpenConfig model openconfig-if-ethernet.yang (physical interface level) version 2.6.2 (no configuration).
Use the base resource path /interfaces/interface/ethernet/state/ in a gRPC or gNMI subscription to export statistics from the Juniper device to an outside collector.
VLAN Sensors
Junos OS Release 19.4R1 supports streaming VLAN statistics for ON_CHANGE using JTI and gRPC services on EX4650 and QFX5120 switches.
This feature supports OpenConfig model openconfig-vlan.yang configuration version 1.0.2.
Use the base resource path /vlans/ in a gRPC subscription to export statistics from the Juniper device to an outside collector.
Other end points you can use in a subscription include:
/vlans/vlan/state/name
/vlans/vlan/state/vlan-id
/vlans/vlan/members/
/vlans/vlan/members/member/interface-ref/state/interface/
/vlans/vlan/members/member/interface-ref/state/interface/switched-vlan/state/interface-mode
/vlans/vlan/members/member/interface-ref/state/interface/switched-vlan/state/native-vlan
/vlans/vlan/members/member/interface-ref/state/interface/switched-vlan/state/access-vlan
/vlans/vlan/members/member/interface-ref/state/interface/switched-vlan/state/trunk-vlan
/vlans/vlan/members/member/interface-ref/state/interface/vlan/state/vlan-id
Change History Table
Feature support is determined by the platform and release you are using. Use Feature Explorer to determine if a feature is supported on your platform.
junos-analytics
instance of the ephemeral configuration database, and the configuration
can be viewed by using the show ephemeral-configuration instance
junos-analytics
operational command.