Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

 
 

Logging, SNMP, and Telemetry

Learn to enable system logging, SNMP, and telemetry services on the QFX5220, QFX5230, QFX5240, QFX5241, and QFX5250 Switches in your network.

System Logging (Syslog)

You can configure system logging (syslog) to maintain network stability, security, and performance. The syslog configuration enables network administrators to monitor, troubleshoot, and audit the device activities.

To configure syslog locally on a switch:

To configure remote syslog server (sending logs to an external syslog server):

To configure the source IP address used for syslog traffic:

SNMP

SNMP monitor network devices such as switches, routers, and other IP-based devices from a single management host. By default, SNMP is not enabled on a QFX Series Switch. However, the operating system running on these switches, Junos OS Evolved, supports SNMPv1, SNMPv2c, and SNMPv3.

To enable SNMP, you need to add the configuration statements at the [edit] hierarchy level. The minimum configuration you can enable for SNMP is SNMP polling.

To define an SNMP community and set its permissions:

For example:

To configure basic SNMP identity:

To limit SNMP queries to trusted management ports:

For example:

To configure SNMP traps:

For example:

To verify whether SNMP is running after configuration, run the following command in operational mode:

Telemetry

Junos telemetry is a telemetry solution developed to stream telemetry data from a Junos device. The QFX5220, QFX5230, QFX5240, QFX5241, and QFX5250 switches support Junos telemetry to stream real-time network data, such as traffic patterns, device status, error rates, and other metrics that provide insights into the network's health and behavior. For more information about Junos telemetry, see Understanding Junos Telemetry. For information about how to configure gRPC and verify telemetry streaming, see Understanding Authentication and Authorization for gRPC-Based Services.

Read configure mutual (bidirectional) authentication for gRPC services to learn how to verify that your QFX Series switches are running Junos OS Evolved and that a network device or a virtual machine running Linux can reach one of the traffic ports on the QFX Series switch. When mutual authentication is configured:

  • The server provides its public key certificate after establishing the channel.

  • The client uses the server's root CA certificate to authenticate the server.

  • The client also provides its certificate when it connects to the server, and the server validates the certificate. If the certificate validation is successful, the client is allowed to make calls.

Perform the following steps to configure and verify telemetry streaming on the QFX Series switches using gNMI.

  1. To obtain the X.509 Certificates (server root certificate authority and server key pairs):

    Note:

    The gRPC server certificate must define either the server hostname in the Common Name (CN) field (the sample command above, vJunosEvolved is the server hostname), or the server IP address in the subjectAltName IP address field in the server_ssl_cert_ext.cnf file (shown below). The client application must use the same value to establish the connection to the server. If the certificate defines the subjectAltName IP address field, the CN field is ignored during authentication.

    The server_ssl_cert_ext.cnf file content is as follows:

    To create a private certificate authority, and then generate and sign a client certificate for TLS use a Juniper-related services like NETCONF/gRPC:

  2. To enable gRPC service:

    To configure mutual authentication instead of server-only authentication:

    To configure authentication for the gRPC client directly (in the network device configuration):

  3. To copy the certificates that you have generated on the client to the gRPC server:

  4. To load the certificate on the server:

  5. To configure the user account for gRPC services:

  6. Identify the information that you want to receive from the QFX Series switch. Information you want to stream through Junos telemetry is specified using a telemetry sensor path. A telemetry sensor path is the hierarchical path (defined using YANG) to the operational data or metrics to be monitored.

    For example, the following sensor path streams administrative and operational status information for interfaces on the device:

    For more information about telemetry sensor paths, see Explore Sensor Paths. To view all the supported sensor paths, their corresponding leaf nodes, and the device platforms, see Junos YANG Data Model Explorer.

  7. Download, install, and configure the gNMI client to test the telemetry streaming on your QFX Series switch. Junos OS Evolved-based devices support various subscription types. See Subscription Types and subscription mode to identify the subscription type and mode for your network.

  8. To test the telemetry streaming on your Linux machine and subscribe to telemetry data using the gNMI client:

    where,

    • format: Specifies the output format used by the gNMI client to display telemetry data. The json format presents telemetry data in JSON. Available options include JSON, BYTES, PROTO, ASCII, and JSON_IETF.

    • sub: Invokes the gNMI subscribe RPC to establish a telemetry subscription with the device.

    • path: Is the YANG sensor path to stream telemetry data.

    • mode: Defines the subscription mode. The stream mode establishes a continuous subscription that sends telemetry updates over time.

    • stream-mode: Specifies the streaming behavior for a stream subscription. The sample mode sends updates at regular intervals.

    • sample-interval: Sets the sampling interval for stream subscriptions when stream-mode sample is configured.

    In the following example, "stream" is selected as subscription type and "sample" as subscription mode.

  9. Verify that the telemetry data is received on the collector. A successful output confirms that the gNMI connection is established and the telemetry data is streaming from the QFX Series switch.

    Sample gNMI Telemetry Output (JSON format)

    A continuous stream of telemetry data indicates that gNMI telemetry streaming is operating correctly on the QFX Series switches.

  10. After verifying your telemetry setup, install one of the many available open-source or third-party collectors.

    Note:

    Setup and configuration of these collectors is beyond the scope of this guide.