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 (both devices running Junos OS and Junos OS Evolved) 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. Note:
For NorthStar to correctly process the JTI telemetry packets from MPC10 line cards on routers running Junos OS, ensure that you:
Configure remote-port in
[services analytics streaming-server server]
as 3000Add
set services analytics export-profile profile-name payload-size 1400
If you are configuring for NorthStar integration with HealthBot, use default remote-port 4000 and set the remote-address to the HealthBot server IP address.
set chassis network-services enhanced-ip set services analytics streaming-server ns remote-address 192.168.10.100 set services analytics streaming-server ns remote-port 3000 set services analytics export-profile ns local-address 10.10.0.10 set services analytics export-profile ns reporting-rate 2 set services analytics export-profile ns format gpb set services analytics export-profile ns transport udp set services analytics sensor ifd server-name ns 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 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 set services analytics sensor lsp export-name ns set services analytics sensor lsp resource /junos/services/label-switched-path/usage/ set services analytics sensor sr-te-color server-name ns set services analytics sensor sr-te-color export-name ns set services analytics sensor sr-te-color resource /junos/services/segment-routing/traffic-engineering/ingress/usage/ set services analytics sensor sid server-name ns set services analytics sensor sid export-name ns set services analytics sensor sid resource /junos/services/segment-routing/sid/usage/ set services analytics sensor sr-te-tunnels server-name ns set services analytics sensor sr-te-tunnels export-name ns set services analytics sensor sr-te-tunnels resource /junos/services/segment-routing/traffic-engineering/tunnel/ingress/usage/ set protocols mpls sensor-based-stats set protocols source-packet-routing telemetry statistics
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.
- NorthStar supports bandwidth sizing and container LSPs
for SR-TE LSPs. Junos OS release 19.2R1 or later is required for this
functionality. There is additional configuration required on the router
to enable collection of segment routing data. For example:
set groups jvision services analytics sensor sr-te-tunnels server-name ns set groups jvision services analytics sensor sr-te-tunnels export-name ns set groups jvision services analytics sensor sr-te-tunnels resource /junos/services/segment-routing/traffic-engineering/tunnel/ingress/usage/
- 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 examples show the configuration of probes out of interface ge-0/1/1.0 to the remote address 10.101.105.2 (on devices running Junos OS) and et-0/0/3:0.0 to the remote address 10.10.10.1 (on devices running Junos OS Evolved). 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 and test et-0/0/3:0.0, in the following examples).
The following is a sample to configure RPM probes in a device running Junos OS.
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
The following is a sample to configure RPM probes in a device running Junos OS Evolved.
set services monitoring rpm owner northstar-ifl test et-0/0/3:0.0 target 10.10.10.1 set services monitoring rpm owner northstar-ifl test et-0/0/3:0.0 source-address 10.10.10.2 set services monitoring rpm owner northstar-ifl test et-0/0/3:0.0 probe-count 15 set services monitoring rpm owner northstar-ifl test et-0/0/3:0.0 probe-interval 1 set services monitoring rpm owner northstar-ifl test et-0/0/3:0.0 test-interval 20 set services monitoring rpm owner northstar-ifl test et-0/0/3:0.0 history-size 512 set services monitoring rpm owner northstar-ifl test et-0/0/3:0.0 moving-average-size 60
- Configure the syslog host using the following commands for both devices running Junos OS
and Junos OS Evolved. :Note:
IMPORTANT: To prevent the population of duplicate delay data to the PCS, do not perform this step if you are configuring for integration with HealthBot.
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 (for devices running Junos OS) or evo-rpm-log.slax (for devices running Junos OS Evolved) 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.
Use a text editor such as vi to make one addition to the rpm-log.slax script as follows (the bundled script will be updated in a future release):
/* Add embedded event policy to trigger the script */ var $event-definition = { <event-options> { <policy> { <name> “rpm-log”; <events> “ping_test_completed”; <events> “ping_test_failed”; <– Add this line <then> { <event-script> { <name> “rpm-log.slax”; <output-format> “xml”;
Enable the script by adding it to the event/scripts configuration:
Note:IMPORTANT: To prevent the population of duplicate delay data to the PCS, do not perform this step if you are configuring for integration with HealthBot.
To enable the rpm-log.slax script:
router> start shell csh command "chmod 770 /var/db/scripts/event/rpm-log" router# set event-options event-script file rpm-log.slax
To enable the evo-rpm-log.slax script:
router> start shell csh command "chmod 770 /var/db/scripts/event/evo-rpm-log.slax" router# set event-options event-script file evo-rpm-log.slax
Add the following lines to the evo-rpm-log.slax script to trigger the script to ping the device every sixty seconds:
router> set event-options generate-event ns-evo-rpm-log time-interval 60 router> set event-options policy ns-evo-rpm-log-policy events ns-evo-rpm-log then event-script evo-rpm-log.slax
The text of the rpm-log.slax script is as 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); } }
The text of the evo-rpm-log.slax script is as 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"; var $connection = jcs:open(); /* Create the RPC to get the probe results */ var $get-rpm-rpc = <rpc> { <get-rpm-probe-results> ; } /* Get the probe results */ var $probe-results = jcs:execute($connection, $get-rpm-rpc); match / { /* Load Probe results */ for-each($probe-results//probe-test-results) { /* Extract data of interest */ var $target-address = target-address; var $test-type = test-type; var $test-owner = owner-name; var $test-name = test-name; var $generic-aggregate-results = generic-aggregate-results; var $one-way = 'false'; mvar $min-delay = 0; mvar $max-delay = 0; mvar $avg-delay = 0; mvar $jitter = 0; mvar $loss-percentage = 0; for-each(generic-aggregate-results) { if (aggregate-type == 'moving average') { set $loss-percentage = format-number(number(loss-percentage), '#.##'); set $min-delay = -1; set $max-delay = -1; set $avg-delay = -1; set $jitter = -1; if (generic-aggregate-measurement) { for-each(generic-aggregate-measurement) { var $rtt_measurement = measurement-type[starts-with(normalize-space(), "Round trip time")]; var $jitter_measurement = measurement-type[starts-with(normalize-space(), "Round trip jitter")]; if ($rtt_measurement) { set $min-delay = format-number(number(measurement-min) div 1000, '#.##'); set $max-delay = format-number(number(measurement-max) div 1000, '#.##'); set $avg-delay = format-number(number(measurement-avg) div 1000, '#.##'); } else if ($jitter_measurement){ set $jitter = format-number(number(measurement-avg) 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," one-way=",$one-way); } } } }