Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

 
 

Data Models and Sensor Paths

Data Models

Juniper Telemetry Interface data models define the structure of telemetry data collected from network devices, using YANG (Yet Another Next Generation). YANG is a standards-based, extensible data modeling language used in the Juniper Telemetry Interface (JTI) to define configuration, operational state data, and remote procedure calls (RPCs) for network devices. In JTI, YANG modules enable the provisioning of sensors to collect and export telemetry data, such as interface statistics, using native or OpenConfig data models. The YANG standard is defined in RFC 6020 and RFC 7950.

Juniper Networks publishes YANG modules for Junos devices, which can be downloaded from the Juniper GitHub repository or generated on-device.

The OpenConfig working group defines the OpenConfig data model. It is a vendor-neutral data model to configure and manage the network. OpenConfig data model generates data as Google Protocol Buffers (GPB) messages in a universal key/value format. JTI allows you to leverage OpenConfig models for a broader, vendor-agnostic view of your network. Openconfig sensor paths are used to retrive sensor information from sensors based on the Openconfig data model. For detailed Openconfig resource path exploration, see Junos YANG Data Model Explorer.

The Juniper native data model is an open and extensible framework developed by Juniper. This model is used to stream telemetry data about the unique features found on Juniper devices. These include interface statistics, routing information, security metrics, and so on. Additionally, the native model allows for the definition of enterprise-specific sensors. To access information from Juniper or enterprise-specific sensors, subscribe to Juniper native sensors. Native sensor paths are used to retrive sensor information from sensors based on the native data model. Juniper’s YANG modules for native sensors are available at Juniper's Telemetry GitHub repository.

Sensor Paths

A telemetry sensor path describes the hierarchical path to the data points or metrics that need to be monitored. To stream the required sensor data and activate the sensor and identify the relevant sensor path. JTI supports both Openconfig sensor paths and native sensor paths:

  • Openconfig Sensor Paths

    To configure data collection from Openconfig sensors, define the subscriptions and sensor paths (for example, /interfaces/interface/state/counters), set up the data collector, and download the Junos Telemetry Interface protocol buffers files from the Juniper Networks support page. Capture and decode the captured data on the collector.

  • Native Sensor Paths

    Native sensor paths are specific to Junos OS (for example, /junos/system/line card/interface/) and offer granular, Juniper-optimized access to device-specific metrics.

    To configure data collection from native sensors, use the Junos CLI to provision native sensors for collecting specific data. Configure the telemetry interface to stream data using gRPC or UDP. Use the protocol buffer's files to decode the streamed data on the collector.

Both path types enable the structured output of data in formats such as JSON or XML, ensuring compatibility with external collectors for efficient monitoring and analytics.

Sensor Path Explorer

The Juniper Networks Junos YANG Data Model Explorer is an online tool for viewing all the supported resource paths, their corresponding leaves, and the device platforms that support them. It enables you to explore or compare various OpenConfig and Native data model attributes. Use the filter option based on the software release number or product to view the list of resource paths and sensors on each platform.

Note: The Junos YANG Data Model Explorer was introduced in the 23.2R2-S2 releases. From releases 20.2R1 up to 23.1R1, the sensor information is available in the Junos Telemetry Sensor Explorer.

Selecting Telemetry Sensor Paths

In a model-driven telemetry system, the sensor path can be configured to end at any level within the data model's container hierarchy. Based on the required telemetry information, you can configure the sensor path to retrieve a broad data set or be very specific and retrieve targetted information for a particular sensor. For example, a sensor path might point to a container that includes all interface statistics on a router, or it could be more granular, focusing on a single metric like packet loss on a specific interface. 

For example, to receive telemetry data about alarms generated on the device (using the OpenConfig data model), you can configure either of the following resource paths based on the granularity of sensor data required:

  • /system/alarms/alarm/id: This path retrieves only the alarm ID.
  • /system/alarms/alarm/config: This path retrieves the detailed alarm information.

Configuring the correct sensor paths ensures an efficient telemetry system. Each resource path enables data streaming for the system resource globally, that is, systemwide. You can modify each resource path to specify a logical or physical interface. The resource path "/interfaces/interface/config" retrieves the list of configurable items at the global, physical interface level, whereas the path "/interfaces/interface/config/name" specifies the name of the interface, and the device may restrict the allowed values for this leaf depending on the type of the interface.

Important Guidelines for Selecting Sensor Paths

  • Users should always provide the complete and direct resource path when configuring sensors. Providing partial resource paths, such as "/components/component/", results in incomplete configurations and potential errors. Such resource paths overwhelm the device, as it needs to display all the available options at that hierarchy. To prevent this, always verify and use the full resource path to ensure precise and efficient sensor configuration.

    Note: Creating subscription and sensor configuration at the "/" (root) and "/junos/" is not allowed.
    Table 1: Sensor Path Example
    Good example of a Resource Path Poor example of a Resource Path
    /interfaces/interface/subinterfaces/subinterface/state/counters/out-pkts /interfaces/interface
  • The logical and physical Packet Forwarding Engine interface sensors report some leaves inconsistently to the collector. For example, the subscribed path /interfaces/ 115 interface/ producing the streamed path /junos/system/linecard/interface/logical/ usage/ reports key name leaves parent_ae_name and init_time (with underscores in the leaf name). The subscribed path /interfaces/interface/state/ producing the streamed path / junos/system/linecard/interface/queue/ reports key name leaves parent-ae-name and init\u0002time (with hyphens in the leaf name).

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.

Release
Description
22.4R1
Starting in Junos OS Evolved Release 22.4R1 you can stream statistics for IPv4 and IPv6 traffic statistics using the resource path /junos/system/linecard/interface/traffic/.
22.4R1
Starting with Junos OS Release 22.4R1, sensors are supported on MX304 routers.
22.3R1
Starting with Junos OS Evolved Release 22.3R1, sensors to stream optics statistics is supported on ACX7100-32C, ACX7100-48L, and ACX7024 routers.
22.3R1
Starting with Junos OS Release 22.3R1, sensors are supported on MX10004 routers.
22.3R1
Junos OS and Junos OS Evolved Release 22.3R1 introduces improved performance time for the initial sync of telemetry statistics. This enhancement applies to subscription requests for the top-level sensor path  /network-instances/network-instance/afts.
20.3R1
Starting with Junos OS Release 20.3R1, gRPC service for exporting LDP and mLDP statistics is supported on MPC10E-10C-MRATE, MPC10E-15C-MRATE, and MX2K-MPC11E line cards.
20.2R1
Starting with Junos OS Evolved Release 20.2R1, gRPC service for streaming NDP statistics is supported on PTX10001 routers.
20.2R1
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.
20.2R1
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.
20.2R1
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.
20.2R1
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.
20.2R1
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..
20.2R1
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.
20.2R1
Starting with Junos OS Release 20.2R1 sensors to stream standby Routing Engine statistics are supported on MX480, MX960, MX10003, MX2010, and MX2020 routers.
20.2R1
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.
20.2R1
Starting with Junos OS Release 20.2R1, gRPC service for exporting LDP and mLDP statistics is supported on MX Series routers.