Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

 
 

Configure a Junos Telemetry Sensor

You can enable monitoring and streaming of data for various system resources, such as physical and logical interfaces and firewall filters using the Command Line Interface (CLI) commands. 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.

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.

Before you begin:

  • Configure a connection from your Juniper Networks device to a server that is using in-band management interfaces.

Configure an Export Profile

An export profile defines the parameters of the export process of data generated through the Junos Telemetry mechanism. You must configure at least one export profile, you can also 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.

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

On MX Series routers 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.
    • At the end of each configured interval, the sensor gathers the most recent sample and forwards it to the designated data collection server.

    • Valid range: For releases prior to 23.4 R2, 1 to 86400 seconds (24 hours).

    Note:

    Starting with Junos OS and Junos Evolved 23.4R2, the minimum supported value for reporting-rate is "2" seconds for Packet Forwarding Engine (PFE) sensors. If a configuration specifies a value below "2" seconds and a software upgrade is performed, the configuration will be dropped, and telemetry will not be operational until the value is corrected.

    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 type of dial-out connection.
    • native-udp-gpb: Select this option for dial-out over UDP (Protobuf Structured Format) connections. The message format is protobuf messages with structured self-describing key-value pairs and the transport protocol is UDP.

    • native-udp-compact: Select this option for dial-out over UDP (Protobuf Compact Format, Juniper Proprietary) connections. The message format is .gpb and the transport protocol is UDP.

    • native-grpc-gpb: Select this option for dial-out over TCP (Protobuf Structured Format) connections. The message format is gpb-gnmi (protobuf messages in structured universal key/value format) and the transport protocol is TCP.

    For example, to stream native sensor information over UDP:

    Note: From release 25.4, the format and transport options are deprecated.
  6. (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. 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:

  7. (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:

  8. (Optional) (Only on MX Series routers) 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:

Configure 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. You can associate more than one server with a specific sensor.

Note:

Guidelines for Streaming Telemetry Data Over UDP:

  1. Telemetry data streams directly from the source application to the collector over UDP. The configuration depends on the type of connection to the collector. The collector must be reachable over the management interface or a WAN interface.
  2. In the case of line card sensors, the line cards can directly export the data to the collector if the remote address is reachable over the WAN interface. If the telemetry data must be exported over the management interface for line card sensors, route the data to the Routing Engine and then send it to the collector.

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:

  4. Specify the TLS parameters, local certificate-id, and ca-profile. You can configure the TLS parameters for each streaming server. For dialout connections you must configure the TLS parameters for each streaming server.
    Note: TLS is not applicable to UDP.
    Note:

    Prior to release 25.4, TLS options were configured under the edit system services extension-service request-response grpc ssl hierarchy. This configuration method is no longer supported starting with release 25.4.

    Note:

    From release 25.4 onwards, use the following Public Key Infrastructure (PKI) commands to load local certificates and Certificate Authority (CA) profiles:

    • request security pki local-certificate load certificate-id certificate id filename dialout_client.crt key dialout_client.key

    • request security pki ca-certificate load ca-profile ca-profile-name filename path/filename

Configure 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, consider configuring different parameters for exporting data from 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:

    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:

Verify the Junos Telemetry Interface Sensor Configuration

Purpose

Confirm your configuration.

Action

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 the configuration procedure to correct it.

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.

Verify the Junos Telemetry Interface Sensor Configuration

Purpose

Confirm your configuration.

Action

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.

View Dial-out Telemetry Statistics

Use the show services analytics dialout statistics command to view the dial-out telemetry statistics.

For example:

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
19.1R1
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.
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.
change-completed
Starting with Junos OS Release 25.4R1, the CLI option dialout-type is introduced in the export-profile command to configure the transport protocol and the telemetry message format. The format and transport options are deprecated.