Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

Navigation

Example: Configuring Enhanced Network Analytics Features

This example shows how to configure the enhanced network analytics feature, including queue and traffic monitoring.

Requirements

This example uses the following hardware and software components:

  • A QFX5100 standalone switch
  • A external streaming server to collect data
  • Junos OS Release 13.2X51-D15 software
  • TCP server software (for remote streaming servers)

Before you configure network analytics, be sure you have:

  • Junos OS Release 13.2X51-D15 or later software installed and running on the QFX5100 switch.
  • (Optional for streaming servers for the JSON, CSV, and TSV formats) TCP or UDP server software set up for processing records separated by a newline character (\n) on the remote streaming server.
  • (Optional for streaming servers for the GPB format) TCP or UDP build streaming server using the analytics.proto file.
  • All other network devices running.

Overview

The network analytics feature provides visibility into the performance and behavior of the data center infrastructure. This feature collects data from the switch, analyzes the data using sophisticated algorithms, and captures the results in reports. Network administrators can use the reports to help troubleshoot problems, make decisions, and adjust resources as needed.

You enable network analytics by first defining a resource profile template, and then applying the profile to the system (for a global configuration) or to individual interfaces.

Note: You can configure queue and traffic monitoring on physical network interfaces only; logical interfaces and Virtual Chassis physical (VCP) interfaces are not supported.

Disabling of the queue or traffic monitoring supersedes the configuration (enabling) of this feature. You disable monitoring by applying a resource profile that includes the no-queue-monitoring or no-traffic-monitoring configuration statement at the [edit services analytics resource-profiles] hierarchy level.

Topology

In this example, the QFX5100 switch is connected to an external server used for streaming statistics data.

Configuration

To configure the network analytics features, perform these tasks:

CLI Quick Configuration

To quickly configure this example, copy the following commands, paste them in a text file, remove any line breaks, change any details necessary to match your network configuration, and then copy and paste the commands into the CLI at the [edit] hierarchy level.

[edit]set services analytics resource system polling-interval queue-monitoring 1000set services analytics resource system polling-interval traffic-monitoring 5set services analytics collector local file an.statsset services analytics collector local file an files 3set services analytics collector local file an size 10mset services analytics resource-profiles sys-rp queue-monitoringset services analytics resource-profiles sys-rp traffic-monitoringset services analytics resource-profiles sys-rp depth-threshold high 999999 low 99set services analytics resource system resource-profile sys-rpset services analytics resource-profiles if-rp queue-monitoringset services analytics resource-profiles if-rp traffic-monitoringset services analytics resource-profiles if-rp latency-threshold high 2300 low 20set services analytics resource interfaces xe-0/0/16 resource-profile if-rpset services analytics resource interfaces xe-0/0/18 resource-profile if-rpset services analytics resource interfaces xe-0/0/19 resource-profile if-rpset services analytics export-profiles ep stream-format gpbset services analytics export-profiles ep interface informationset services analytics export-profiles ep interface statistics queueset services analytics export-profiles ep interface statistics trafficset services analytics export-profiles ep interface status linkset services analytics export-profiles ep system informationset services analytics export-profiles ep system status queueset services analytics export-profiles ep system status trafficset services analytics collector address 10.94.198.11 port 50001 transport tcp export-profile epset services analytics collector address 10.94.184.25 port 50013 transport udp export-profile ep

Configuring the Polling Interval for Queue and Traffic Monitoring

Step-by-Step Procedure

To configure the polling interval queue and traffic monitoring globally:

  1. Configure the queue monitoring polling interval (in milliseconds) for the system:
    [edit]set services analytics resource system polling-interval queue-monitoring 1000
  2. Configure the traffic monitoring polling interval (in seconds) for the system:
    [edit]set services analytics resource system polling-interval traffic-monitoring 5

Configuring a Local Statistics File

Step-by-Step Procedure

To configure a file for local statistics collection:

  1. Configure the filename:
    [edit]set services analytics collector local file an.stats
  2. Configure the number of files:
    [edit]set services analytics collector local file an files 3
  3. Configure the file size:
    [edit]set services analytics collector local file an size 10m

Configuring and Applying a Resource Profile for the System

Step-by-Step Procedure

To define a resource profile template for queue and traffic monitoring resources:

  1. Configure a resource profile and enable queue monitoring:
    [edit]set services analytics resource-profiles sys-rp queue-monitoring
  2. Enable traffic monitoring in the profile:
    [edit]set services analytics resource-profiles sys-rp traffic-monitoring
  3. Configure the depth-threshold (high and low values) for queue monitoring in the profile:
    [edit]set services analytics resource-profiles sys-rp depth-threshold high 999999 low 99
  4. Apply the resource profile template to the system resource type for a global configuration:
    [edit]set services analytics resource system resource-profile sys-rp

Configuring and Applying a Resource Profile for an Interface

Step-by-Step Procedure

You can configure queue and traffic monitoring for one or more specific interfaces. The interface-specific configuration supersedes the global (system) configuration. To define a resource profile template for queue and traffic monitoring resources for an interface:

  1. Configure a resource profile and enable queue monitoring:
    [edit]set services analytics resource-profiles if-rp queue-monitoring
  2. Enable traffic monitoring in the profile:
    [edit]set services analytics resource-profiles if-rp traffic-monitoring
  3. Configure the latency-threshold (high and low values) for queue monitoring in the profile:
    [edit]set services analytics resource-profiles if-rp latency-threshold high 2300 low 20
  4. Apply the resource profile template to the interfaces resource type for specific interfaces:
    [edit]set services analytics resource interfaces xe-0/0/16 resource-profile if-rpset services analytics resource interfaces xe-0/0/18 resource-profile if-rpset services analytics resource interfaces xe-0/0/19 resource-profile if-rp

Configuring an Export Profile and Collector for Streaming Data

Step-by-Step Procedure

To configure a collector (streaming server) for receiving monitoring data:

  1. Create an export profile and specify the stream format:
    [edit]set services analytics export-profiles ep stream-format gpb
  2. Configure the export profile to include interface information:
    [edit]set services analytics export-profiles ep interface information
  3. Configure the export profile to include interface queue statistics:
    [edit]set services analytics export-profiles ep interface statistics queue
  4. Configure the export profile to include interface traffic statistics:
    [edit]set services analytics export-profiles ep interface statistics traffic
  5. Configure the export profile to include interface status link information:
    [edit]set services analytics export-profiles ep interface status link
  6. Configure the export profile to include system information:
    [edit]set services analytics export-profiles ep system information
  7. Configure the export profile to include system queue status:
    [edit]set services analytics export-profiles ep system status queue
  8. Configure the export profile to include system traffic status:
    [edit]set services analytics export-profiles ep system status traffic
  9. Configure the transport protocol for the collector addresses and apply an export profile:
    [edit]set services analytics collector address 10.94.198.11 port 50001 transport tcp export-profile epset services analytics collector address 10.94.184.25 port 50013 transport udp export-profile ep

    Note: If you configure the tcp or udp option for the JSON, CSV, and TSV formats, you must also set up the TCP or UDP client software on the remote collector to process records that are separated by the newline character (\n) on the remote server.

    If you configure the tcp or udp option for the GPB format, you must also set up the TCP or UDP build streaming server using the analytics.proto file.

Results

Display the results of the configuration:

[edit services analytics]user@switch# run show configuration
services {analytics {export-profiles {ep {stream-format gpb;interface {information;statistics {traffic;queue;}status {link;}}system {information;status {traffic;queue;}}}}resource-profiles {sys-rp {queue-monitoring;traffic-monitoring;depth-threshold high 99999 low 99;}if-rp {queue-monitoring;traffic-monitoring;latency-threshold high 2300 low 20;}}resource {system {resource-profile sys-rp;polling-interval {traffic-monitoring 5;queue-monitoring 1000;}}interfaces {xe-0/0/16 {resource-profile if-rp;}xe-0/0/18 {resource-profile if-rp;}xe-0/0/19 {resource-profile if-rp;}}}collector {local {file an size 10m files 3;}address 10.94.184.25 {port 50013 {transport udp {export-profile ep;}}}address 10.94.198.11 {port 50001 {transport tcp {export-profile ep;}}}}}}

Verification

Confirm that the configuration is correct and works as expected by performing these tasks:

Verifying the Network Analytics Configuration

Purpose

Verify the configuration for network analytics.

Action

From operational mode, enter the show analytics configuration command to display the traffic and queue monitoring configuration.

user@host> show analytics configuration

Traffic monitoring status is enabled Traffic monitoring polling interval : 5 seconds Queue monitoring status is enabled Queue monitoring polling interval : 1000 milliseconds Queue depth high threshold : 99999 bytes Queue depth low threshold : 99 bytes Interface Traffic Queue Queue depth Latency Statistics Statistics threshold threshold High Low High Low (bytes) (nanoseconds) xe-0/0/16 enabled enabled n/a n/a 2300 20 xe-0/0/18 enabled enabled n/a n/a 2300 20 xe-0/0/19 enabled enabled n/a n/a 2300 20

Meaning

The output displays the traffic and queue monitoring configuration information on the switch.

Verifying the Network Analytics Status

Purpose

Verify the network analytics operational status of the switch.

Action

From operational mode, enter the show analytics status global command to display global traffic and queue monitoring status.

user@host> show analytics status global

Traffic monitoring status is enabled Traffic monitoring pollng interval : 5 seconds Queue monitoring status is enabled Queue monitoring polling interval : 1000 milliseconds Queue depth high threshold : 99999 bytes Queue depth low threshold : 99 bytes

From operational mode, enter the show analytics status command to display both the interface and global queue monitoring status.

user@host> show analytics status

Traffic monitoring status is enabled Traffic monitoring pollng interval : 5 seconds Queue monitoring status is enabled Queue monitoring polling interval : 1000 milliseconds Queue depth high threshold : 99999 bytes Queue depth low threshold : 99 bytes Interface Traffic Queue Queue depth Latency Statistics Statistics threshold threshold High Low High Low (bytes) (nanoseconds) xe-0/0/16 enabled enabled n/a n/a 2300 20 xe-0/0/18 enabled enabled n/a n/a 2300 20 xe-0/0/19 enabled enabled n/a n/a 2300 20

Meaning

The output displays the global and interface status of traffic and queue monitoring on the switch.

Verifying the Collector Configuration

Purpose

Action

Verify the configuration for the collector for streamed data is working.

From operational mode, enter the show analytics collector command to display the streaming servers configuration.

user@host> show analytics collector

Address Port Transport Stream format State Sent 10.94.184.25 50013 udp gpb n/a 484 10.94.198.11 50001 tcp gpb In progress 0

Meaning

The output displays the collector configuration.

Note: The connection state of a port configured with the udp transport protocol is always displayed as n/a.

Verifying Queue Statistics

Purpose

Verify that queue statistics collection is working.

Action

From operational mode, enter the show analytics queue-statistics command to display the queue statistics.

user@host> show analytics queue-statistics

CLI issued at 2014-03-04 15:37:03.116018 Time Interface Queue-depth Latency (bytes) (nanoseconds) 00:00:00.412371 ago xe-0/0/19 1384656 1107724 00:00:01.412395 ago xe-0/0/19 1375712 1100569 00:00:02.415366 ago xe-0/0/19 1385280 1108224 00:00:03.417395 ago xe-0/0/19 1381744 1105395 00:00:04.411392 ago xe-0/0/19 1368432 1094745 00:00:05.414387 ago xe-0/0/19 1374880 1099904 00:00:06.414365 ago xe-0/0/19 1373632 1098905 00:00:07.416386 ago xe-0/0/19 1370096 1096076 00:00:08.413384 ago xe-0/0/19 1377168 1101734 00:00:09.415379 ago xe-0/0/19 1370720 1096576 00:00:10.418374 ago xe-0/0/19 1381120 1104896 00:00:11.410376 ago xe-0/0/19 1383408 1106726 00:00:12.412372 ago xe-0/0/19 1382576 1106060 00:00:13.417371 ago xe-0/0/19 1387152 1109721 00:00:14.411368 ago xe-0/0/19 1375296 1100236 ---(more)---

Meaning

The output displays queue-statistics information, with the latest record at the top of the report.

Verifying Traffic Statistics

Purpose

Verify that traffic statistics collection is working.

Action

From operational mode, enter the show analytics traffic-statistics command to display the traffic statistics.

user@host> show analytics traffic-statistics

CLI issued at 2014-03-04 15:37:52.047136 Time: 00:00:02.252377 ago, Physical interface: xe-0/0/19 Traffic Statistics: Receive Transmit Total octets: 15044882432 1502607382656 Total packets: 117538143 11739120146 Unicast packet: 117538143 11739120146 Multicast packets: 0 0 Broadcast packets: 0 0 Octets per second: 86488360 8649309384 Packets per second: 84461 8446590 CRC/Align errors: 0 0 Packets dropped: 0 11760298455 Time: 00:00:02.252377 ago, Physical interface: xe-0/0/18 Traffic Statistics: Receive Transmit Total octets: 1504619929836 15782818944 Total packets: 11754843131 123303273 Unicast packet: 11754843131 123303273 Multicast packets: 0 0 Broadcast packets: 0 0 Octets per second: 8649134008 86487816 Packets per second: 8446458 84461 CRC/Align errors: 5 0 Packets dropped: 0 0 Time: 00:00:02.252377 ago, Physical interface: xe-0/0/16 Traffic Statistics: Receive Transmit Total octets: 1504801437048 757345408 Total packets: 11756261156 5916761 Unicast packet: 11756261156 5916761 Multicast packets: 0 0 Broadcast packets: 0 0 Octets per second: 7910619496 0 Packets per second: 7725214 0 CRC/Align errors: 3 0 Packets dropped: 0 0

Meaning

The output displays traffic-statistics information.

Published: 2014-07-28

Supported Platforms

Published: 2014-07-28