Supported Platforms
Related Documentation
- QFX Series standalone switches
- Network Analytics Overview
- analytics
- show analytics status
- show analytics collector
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:
- Configuring the Polling Interval for Queue and Traffic Monitoring
- Configuring a Local Statistics File
- Configuring and Applying a Resource Profile for the System
- Configuring and Applying a Resource Profile for an Interface
- Configuring an Export Profile and Collector for Streaming Data
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.
Configuring the Polling Interval for Queue and Traffic Monitoring
Step-by-Step Procedure
To configure the polling interval queue and traffic monitoring globally:
- Configure the queue monitoring polling interval (in milliseconds)
for the system:[edit]set services analytics resource system polling-interval queue-monitoring 1000
- 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:
- Configure the filename:[edit]set services analytics collector local file an.stats
- Configure the number of files:[edit]set services analytics collector local file an files 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:
- Configure a resource profile and enable queue monitoring:[edit]set services analytics resource-profiles sys-rp queue-monitoring
- Enable traffic monitoring in the profile:[edit]set services analytics resource-profiles sys-rp traffic-monitoring
- 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
- 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:
- Configure a resource profile and enable queue monitoring:[edit]set services analytics resource-profiles if-rp queue-monitoring
- Enable traffic monitoring in the profile:[edit]set services analytics resource-profiles if-rp traffic-monitoring
- 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
- 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:
- Create an export profile and specify the stream format:[edit]set services analytics export-profiles ep stream-format gpb
- Configure the export profile to include interface information:[edit]set services analytics export-profiles ep interface information
- Configure the export profile to include interface queue
statistics:[edit]set services analytics export-profiles ep interface statistics queue
- Configure the export profile to include interface traffic
statistics:[edit]set services analytics export-profiles ep interface statistics traffic
- Configure the export profile to include interface status
link information:[edit]set services analytics export-profiles ep interface status link
- Configure the export profile to include system information:[edit]set services analytics export-profiles ep system information
- Configure the export profile to include system queue status:[edit]set services analytics export-profiles ep system status queue
- Configure the export profile to include system traffic
status:[edit]set services analytics export-profiles ep system status traffic
- 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:
Verification
Confirm that the configuration is correct and works as expected by performing these tasks:
- Verifying the Network Analytics Configuration
- Verifying the Network Analytics Status
- Verifying the Collector Configuration
- Verifying Queue Statistics
- Verifying Traffic Statistics
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.
Related Documentation
- QFX Series standalone switches
- Network Analytics Overview
- analytics
- show analytics status
- show analytics collector
Published: 2014-07-28
Supported Platforms
Related Documentation
- QFX Series standalone switches
- Network Analytics Overview
- analytics
- show analytics status
- show analytics collector