Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

 
 

Establish a Dial-in Telemetry Connection

This topic describes the procedure to establish a dial-in telemetry connection. Configure the gRPC service and data collector, and select sensor paths based on the sensor information you want to collect from the Junos device.

In dial-in mode, the data collector initiates the connection to the network device and subscribes to telemetry data. A session is established between the collector and the device, and then data is streamed from the device to the collector (streaming intervals can be configured). This method is preferred by operators who want a single configuration and operational data channel.

Prerequisites:

  1. Ensure the Juniper device runs a compatible Junos OS version that supports JTI.
  2. Set up a gRPC-compatible telemetry collector (for example, Juniper Telemetry Collector, Prometheus, or InfluxDB) to receive and process telemetry data.
  3. Ensure the Juniper device and collector can communicate over the network (TCP port 50051 for gRPC (default), or a custom port).
  4. If your implementation uses TLS, prepare certificates for the device and collector.
  5. For a complete list of sensors supported for your Juniper device, see Junos YANG Data Model Explorer.
  6. Configure gRPC services, see Configure gRPC Services.

Follow the procedures listed below to establish a dial-in telemetry connection:

Configure the Data Collector

  1. The collector must be ready to initiate the connection. Configure the gRPC client to connect to the Juniper device, where:
    • IP Address: The device’s management IP (192.168.1.1).
    • Port: 50051 (or custom port).
    • Protocol: gRPC with gNMI or JET subscription.
    • Credentials: If TLS is enabled, provide the client certificate and key.
    • Subscription: Specify the sensor paths (for example, /junos/system/linecard/interface/) and subscription mode (for example, stream).

    Install and configure the gNMI client on the collector. Ensure the protobuf definitions are available on the collector. This information is required to decode the sensor data received at the collector. The gNMI client is available on Git Hub, see gNMI client on Github.

    Run the following command:

    gnmic -a <device_ip>:<port> subscribe --path <path> --mode stream

    For example:

    gnmic -a 192.168.1.1:50051 subscribe --path /junos/system/linecard/interface/ --mode stream
  2. To verify the configuration, you can use show agent sensors and show extension-service request-response clients commands.
  3. On the data collector, verify if the data is received. For example, if Prometheus or Grafana is used as a data collector, check the logs or visualizations.

Selecting Sensor Paths

Sensor Explorer and Guidelines for Selecting Sensor Paths

Use the Juniper Networks Junos YANG Data Model Explorer to view all the supported resource paths, their corresponding leaves, and the device platforms that support them.

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.

For information on guidelines and best practices for configuring sensor paths, see Explore Sensor Paths.

Decoding Data on the Collector

Decode data on the collector

This procedure shows you how to capture data, decode raw data, and use the protocol buffers files to decode data.

To decode data:

  1. Capture the data.

    Run netcat on a destination streaming telemetry server, or collector, in UDP listener mode to store all incoming datagrams into a file. Use the destination port number configured in streaming-server profile on your Juniper Networks device.

    Note:

    This command stores datagrams into a file named data.gpb. Run this program to capture data. When you want to stop receiving data, stop with the program by sending the break signal (Control + C)

  2. Decode raw data.

    Note:

    This step is optional. It is not required if you know the encoded message type of the data.

    Decode the message from the data.gpb file.

    The next nested structure under 2636 identifies the sensor type. The numerical value 2636 identifies the JuniperNetworksSensor message, which is defined in the telemetry_top.proto file. In this example, the numerical identifier 7 corresponds to the LogicalPort message defined in the logical_port.proto file. Use this information in the next step to generate more detailed output.

  3. Decode the message to include field names.

    Run the protocol buffers compiler with the decode option. Additionally, specify the top-level message type (TelemetryStream) and the file with the message definition, logical_port.proto. You must also include the Goggle protocol buffers (gpb) library.