Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

 
 

Configuring Dial-Out Telemetry

Configuring dial-out telemetry involves setting up the network devicesto automatically send telemetry data to a collector.

To monitor a specific system resource, you configure a sensor. Each sensor configuration requires three main components:

  • Sensor profile—Enables the system resource to monitor and allows you to set related parameters, such as the destination server to send data.

  • Export profile—Specifies the attributes for the process of exporting collected data, such as the transport protocol to use and the interval at which to collect data.

  • Streaming server profile—Specifies the server for collecting data and related parameters, including the destination IP address and port number. Before you begin configure a connection from your Juniper Networks device to a server that is using in-band management interfaces.

Best Practice:

We recommend that you configure at least one export profile and at least one streaming server before you configure a sensor profile. This way you can associate an export profile and a streaming server with the sensor profile configuration.

Configuring a Streaming Server Profile

A server profile defines the parameters of the server that collects exported telemetry data. You can define more than one server profile. You can also associate the same server profile with more than one sensor profile. Starting in Junos OS Release 15.1F6, you can associate more than one server with a specific sensor.

To define the profile of a streaming server to collect exported telemetry data:

  1. Specify the name of the streaming sever.

    For example, to specify a streaming-server name of telemetry server:

  2. Specify a destination IP address for the exported packets.

    For example, to specify a destination address of 192.0.2.2 for a streaming server with the name telemetry-server:

  3. Specify a destination port number for the exported packets.

    For example, to specify a destination port number of 30000 for a streaming server with the name telemetry-server:

Configuring an Export Profile

An export profile defines the parameters of the export process of data generated through the Junos telemetry interface. You must configure at least one export profile, but you can configure multiple export profiles. Each export profile can be associated with multiple sensor profiles. However, you can associate only one export profile with a specific sensor profile.

To enable export of statistics, include the export-profile and sensor statements at the [edit services analytics] hierarchy level. The export profile must include the reporting rate, the transport service (for example, gRPC), and the format (for example, gbp-gnmi). The sensor configuration should include the name of the collector (the server’s name), the name of the export profile, and the resource path. An example of a resource path is /interfaces/interface[name='fxp0'.

Note:

When configuring an export profile for gNMI dial out, the export profile parameters, such as {'dscp', 'forwarding-class', 'payload-size'} are not applicable. Configuring any of these options generates an error.

Platform-Specific Export Profile Behavior

Use Feature Explorer to confirm platform and release support for specific features.

Use the following table to review platform-specific behaviors for your platforms:

Table 1: Platform-Specific Export Profile Behavior

Platform

Difference

MX Series

Starting with Junos OS Release 17.3R1 on MX Series routers only, you can specify a packet loss priority for an export profile. As a result, you can apply the appropriate packet loss priority to each sensor. Loss priority settings help determine which packets are dropped from the network during periods of congestion. Previously, you could specify only the forwarding class and the DSCP value in an export profile. The following packet loss priority settings are supported: high, low, medium-high and medium-low. For more information about packet loss priority settings, see Mapping PLP to RED Drop Profiles.

To configure an export profile:

  1. Specify a name for the export profile.

    For example, to specify an export-profile name of export-params:

  2. Specify the source IP address of exported packets.

    For example, to specify a source IP address of 192.0.2.3 for an export profile with the name export-params:

  3. Specify the source port number of exported packets.

    For example, to specify a source port number of 21111 for an export profile with the name export-params:

  4. Specify the interval, in seconds, at which the sensor generates telemetry data.

    For example, to specify an interval of 20 seconds at which any sensor associated with the export-profile with the name export-params generates telemetry data :

  5. Specify the format to define the structure of the exported data.
    Note:

    The only currently supported format is Google protocol buffers (gpb)

    For example, to specify the Google protocol buffers format for exported data for an export-profile with the name export-params:

  6. Specify the transport protocol to carry the telemetry data in the IP packets.

    For example, to specify the UDP as the transport protocol for telemetry data for an export profile with the name export-params:

    Note: Configuring the transport protocol as udp and the export data format as gpb-gnmi together is erroneous.
  7. (Optional) Specify the DiffServ code point (DSCP) value to assign to exported packets.
    Note:

    The default value is 0 (zero).

    Any interface-level DSCP rewrite rules you have configured override the DSCP value you specify for the export profile. You need to specify a DSCP value for the export profile only if you do not configure DSCP rewrite rules on the outgoing interface. For more information, see Configuring Rewrite Rules.

    For example, to specify a DSCP value of 20 for an export profile with the name export-params:

  8. (Optional) Specify a forwarding class to assign to exported packets.
    Note:

    You can specify a forwarding class only for packets exported by Packet Forwarding Engine sensors. The default value is best-effort.

    For example, to specify a forwarding class of assured-forwarding for an export-profile with the name export-params:

  9. (Optional) (MX Series routers only on Junos OS Release 17.3R1 or later) Specify a packet loss priority to assign to exported packets.

    For example, to specify a loss priority of high for an export profile with the name export-params:

Configuring a Sensor Profile

A sensor profile defines the parameters of the system resource to monitor and stream data. You can enable only one system resource to monitor for each sensor profile. Configure a different sensor profile for each system resource you want to monitor. You can, however, configure more than one sensor to monitor the same system resource. For example, you might want to configure different parameters for exporting data for the same system resource.

To configure a sensor profile:

  1. Specify the name of the sensor.

    For example, to specify a sensor name of interface-1:

  2. Specify the system resource to monitor and stream data.

    For example, to enable monitoring of logical interfaces for sensor interface-1:

    Note:

    You must enter the resource string exactly.

  3. (Optional) Specify a regular expression to filter data for the system resource you specified in Step 2. If you do not specify a regular expression, the system resource is monitored globally, that is, systemwide.

    For example, to filter data only for Ethernet logical interfaces for sensor interface-1:

  4. Specify the name of a export profile configured at the [edit export-profile profile-name] hierarchy level to associate with the sensor profile. This export profile defines the parameters for exporting telemetry data.

    For example, to associate an export profile named export-params with a sensor named interface-1:

  5. Specify the name of a streaming server name configured at the [edit services analytics streaming-server server-name] hierarchy level to collect exported data.
    Note:

    Starting in Junos OS Release 15.1F6, you can specify more than one streaming server for a sensor profile. To specify more than one streaming server for a sensor, you must enclose the names in brackets.

    For example, to associate a streaming server name telemetry-server with a sensor named interface-1:

Verifying Junos Telemetry Interface Sensor Configuration

From configuration mode, confirm your configuration by entering the show services analytics command. If your output does not display the intended configuration, repeat the instructions in this configuration procedure to correct the configuration.

After you commit the configuration, verify that the sensor is enabled by issuing the show agent sensors operational command.

Note:

The show agent sensors command output for gRPC sensors is truncated on the Junos OS Evolved platform to align with the output format of the Junos OS platform.

Telemetry Sensor Paths

A telemetry sensor path is a specific route within a data model, often defined using YANG, that specifies the exact data to be collected and streamed from a network device. It 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, identify the relevant sensor path.

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.

To search and view other telemetry sensors and specific information about some legacy sensors, see Legacy Sensor Paths.

Configuring 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 Configuring 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 2: 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
17.3R1
Starting with Junos OS Release 17.3R1 on MX Series routers only, you can specify a packet loss priority for an export profile.