Configuring Routers to Send JTI Telemetry Data and RPM Statistics to the Data Collectors
Junos Telemetry Interface (JTI) sensors generate data from the PFE (LSP traffic data, logical and physical interface traffic data), and will only send probes through the data-plane. So, in addition to connecting the routing engine to the management network, a data port must be connected to the collector on one of your devices. The rest of the devices in the network can use that interface to reach the collector.
You must use Junos OS Release 15.1F6 or later for NorthStar analytics.
To configure the routers, use the following procedure:
- Configure the devices for telemetry data. On each device,
the following configuration is required. The device needs to be set
to enhanced-ip mode, which might require a full reboot.
set chassis network-services enhanced-ip set services analytics streaming-server ns-ifd remote-address 192.168.10.100 set services analytics streaming-server ns-ifd remote-port 2000 set services analytics streaming-server ns-ifl remote-address 192.168.10.100 set services analytics streaming-server ns-ifl remote-port 2001 set services analytics streaming-server ns-lsp remote-address 192.168.10.100 set services analytics streaming-server ns-lsp remote-port 2002 set services analytics export-profile ns local-address 10.0.0.101 set services analytics export-profile ns reporting-rate 30 set services analytics export-profile ns format gpb set services analytics export-profile ns transport udp set services analytics sensor ifd server-name ns-ifd set services analytics sensor ifd export-name ns set services analytics sensor ifd resource /junos/system/linecard/interface/ set services analytics sensor ifl server-name ns-ifl set services analytics sensor ifl export-name ns set services analytics sensor ifl resource /junos/system/linecard/interface/logical/usage/ set services analytics sensor lsp server-name ns-lsp set services analytics sensor lsp export-name ns set services analytics sensor lsp resource /junos/services/label-switched-path/usage/ set protocols mpls sensor-based-stats
In this configuration, the remote address is the IP address of the collector (reachable though a data port). The local address should be the loopback, or router-id, whichever is configured on the device profile to identify the device.
- Real-time performance monitoring (RPM) enables you to
monitor network performance in real time and to assess and analyze
network efficiency. To achieve this, RPM exchanges a set of probes
with other IP hosts in the network for monitoring and network tracking
purposes.
Configure RPM probes to measure the interface delays. The following example shows the configuration of probes out of interface ge-0/1/1.0 to the remote address 10.101.105.2. This remote address should be the IP address of the node at the other end of the link.
Note The test name must match the interface being measured (test ge-0/1/1.0, in this example).
set services rpm probe northstar-ifl test ge-0/1/1.0 target address 10.101.105.2 set services rpm probe northstar-ifl test ge-0/1/1.0 probe-count 11 set services rpm probe northstar-ifl test ge-0/1/1.0 probe-interval 5 set services rpm probe northstar-ifl test ge-0/1/1.0 test-interval 60 set services rpm probe northstar-ifl test ge-0/1/1.0 source-address 10.101.105.1 set services rpm probe northstar-ifl test ge-0/1/1.0 moving-average-size 12 set services rpm probe northstar-ifl test ge-0/1/1.0 traps test-completion set services rpm probe northstar-ifl test ge-0/1/1.0 hardware-timestamp
- Configure the syslog host using the following commands:
set system syslog host 192.168.18.1 daemon info set system syslog host 192.168.18.1 port 1514 set system syslog host 192.168.18.1 match-strings RPM_TEST_RESULTS
- RPM probes do not yet generate telemetry data, but you
can use the rpm-log.slax script to push the results. The script is
located in
/opt/northstar/data/logstash/utils/junoscripts
. Install the script to/var/db/scripts/event
on the router. Enable the script by adding it to the event/scripts configuration:set event-options event-script file rpm-log.slax
The text of the rpm-log.slax script follows. Comments are enclosed in /* */.
version 1.2; ns junos = "http://xml.juniper.net/junos/*/junos"; ns xnm = "http://xml.juniper.net/xnm/1.1/xnm"; ns jcs = "http://xml.juniper.net/junos/commit-scripts/1.0"; import "../import /junos.xsl"; param $test-owner = event-script-input/trigger-event/attribute-list/attribute [name=="test-owner"]/value; param $test-name = event-script-input/trigger-event/attribute-list/attribute [name=="test-name"]/value; param $delay-value; var $arguments = { <argument> { <name> “test-name”; <description> “Name of the RPM test”; } <argument> { <name> “test-owner”; <description> “ Name of the RPM probe owner”; } <argument> { <name> “delay-value”; <description> “Delay value to send out, used to generate fake data”; } } /* Add embedded event policy to trigger the script */ var $event-definition = { <event-options> { <policy> { <name> “rpm-log”; <events> “ping_test_completed”; <then> { <event-script> { <name> “rpm-log.slax”; <output-format> “xml”; } } } } } match / { <op-script-results> { /* Load Probe results */ var $get-probe-resultsrpc = <get-probe-results> { <owner> $test- owner; <test> $test-name;} var $probe-results = jcs:invoke($get-probe-resultsrpc); /* Extract data of interest */ var $target-address = $probe-results/probe-test-results/target-address; var $probe-type = $probe-results/probe-test-results/probe-type; var $loss-percentage = format-number(number($probe-results/probe-test- results/probe-test-moving-results/probe-test-generic-results/loss-percentage), '#.##'); var $jitter = format-number(number($probe-results/probe-test-results/probe- test-moving-results/probe-test-generic-results/probe-test-rtt/probe-summary-results/ jitter-delay) div 1000, '#.###'); var $avg-delay = { if ($delay-value) { number($delay-value); } else { expr format-number(number($probe-results/probe-test-results/probe-test- moving-results/probe-test-generic-results/probe-test-egress/probe-summary-results/avg- delay) div 1000, '#.##'); } } var $min-delay = { if ($delay-value) { number($delay-value); } else { expr format-number(number($probe-results/probe-test-results/probe-test- moving-results/probe-test-generic-results/probe-test-egress/probe-summary-results/min- delay) div 1000, '#.##'); } } var $max-delay = { if ($delay-value) { number($delay-value); } else { expr format-number(number($probe-results/probe-test-results/probe-test- moving-results/probe-test-generic-results/probe-test-egress/probe-summary-results/max- delay) div 1000, '#.##'); } } expr jcs:syslog("daemon.info","RPM_TEST_RESULTS: ","test-owner=",$test-owner," test-name=",$test-name," loss=",$loss-percentage," min-rtt=",$min-delay," max-rtt=", $max-delay," avgerage-rtt=",$avg-delay," jitter=",$jitter); } }