Industry Solutions and Trends
Technology is more than just networking and Juniper experts share their views on all the trends affecting IT
Industry Solutions and Trends
Juniper New Relic Plugin
05.01.15

In this blog we discuss the integration of Juniper devices with the New Relic analytics platform.

 

The growing complexity of networks makes it difficult to provide visibility of what is happening across the entire infrastructure. It is extremely important to know the performance, resource utilization, and health of network devices. This helps with preventing outages, troubleshooting issues, and performing network planning. An efficient analytics platform helps in performing all these tasks seamlessly.

 

New Relic is an analytics platform that makes sense of billions of data points, millions of applications and servers in real time. Tens of thousands of customers use the New Relic cloud solution every day, looking to optimize more than 200 billion data points for three million application instances. When the brand and customer experience depend on the performance of modern software, New Relic can help to provide valuable insights into the overall environment.

 

New Relic’s technology, delivered as a Software as a Service (SaaS) model, monitors applications or servers in real-time. The analytics platform uses built-in agents to collect performance metrics from applications and servers. The platform also provides infrastructure to store and aggregate collected metrics, and trends them in graphs and tables on presentable dashboards. The trends are important for understanding how applications and servers behave in real time and to isolate potential problems. The diagram below depicts New Relic’s analytics infrastructure:

                          Ree.png                                                                                                                            

                                                                                

1 – New Relic agents running on premises collect and send application and server specific metrics

2 – New Relic agents send metrics to the New Relic analytics platform hosted in the cloud

3 – The New Relic account holder logs into the New Relic cloud portal and views application and equipment performance trends

 

New Relic doesn’t restrict analytics data collection to built-in agents; it also supports third-party plugins that can use JSON over HTTPS to send collected metrics to the New Relic analytics platform. The metrics sent to the New Relic must be key-value pairs. For example, for monitoring CPU and memory statistics of a server, the JSON messages sent to New Relic would look similar to this:

 

"metrics" : {

   "Component/Server/CPU [Percentage]”: {

       “total”: 25,

       "count”: 1,

       "min”: 10,

       "max”: 15,

       "sum_of_squares”: 325

   },

   "Component/Server/Memory [MB]”: {

       “total”: 50,

       "count”: 1,

       "min”: 10,

       "max”: 60,

       "sum_of_squares”: 2500

   }

}

 

Once a plugin starts reporting metrics to the New Relic platform, the metric key paths appear in the dashboard and the user can create tables and charts to understand how the metrics behave over time.

 

Juniper Networks has developed a new plugin for New Relic to collect metrics from Juniper devices such as the EX Series and QFX Series switches and the MX Series routers. The plugin sends the collected metrics up to the New Relic cloud using JSON over HTTPS.

 

The Juniper plugin for New Relic uses NETCONF to communicate with the Juniper devices. NETCONF is an IETF standard protocol (RFC6241) for configuring and retrieving operational state from network devices. All Juniper Networks routers, switches, and security gateways running the Junos operating system support NETCONF with consistent data models. See http://www.juniper.net/documentation/en_US/junos13.2/information-products/pathway-pages/netconf-guid... for more details on NETCONF support in Junos (the operating system for Juniper devices)

 

The plugin has been implemented in Python. Internally it uses the open source Py-Junos-Eznc library which provides a high-level abstraction of the NETCONF interface. For more information on Py-Junos-Eznc see https://github.com/Juniper/py-junos-eznc.

 

Juniper has open sourced the agent on Github at https://github.com/Juniper/juniper-newrelic-plugin using a permissive Apache 2.0 license. For installation of plugin, see installation.txt in Github.The plugin can be installed using the following PIP command:

                                             pip install $path/jnpr_nr_plugin-1.0.0.tar.gz                        

 

The plugin periodically polls Juniper devices and collects various statistics. The collected metrics include routing engine statistics (for instance memory and CPU utilization) and physical interface statistics (for instance bytes-in, bytes-out, errors-in, errors-out). The table below depicts the metrics collected by the plugin and the corresponding New Relic key paths:

 

Metrics Type

NR Path

Interface

Component/interface/bytes/rx/$itf_name[bytes/sec]

Component/interface/packets/rx/$itf_name[pkts/sec]

Component/interface/unicast/rx/$itf_name[pkts/sec]

Component/interface/multicast/rx/$itf_name[pkts/sec]

Component/interface/broadcast/rx/$itf_name[pkts/sec]

Component/interface/errors/rx/$itf_name[errors/sec]

Component/interface/bytes/tx/$itf_name[bytes/sec]

Component/interface/packets/tx/$itf_name[pkts/sec]

Component/interface/unicast/tx/$itf_name[pkts/sec]

Component/interface/multicast/tx/$itf_name[pkts/sec]

Component/interface/broadcast/tx/$itf_name[pkts/sec]

Component/interface/errors/tx/$itf_name[errors/sec]

Component/interface/state/admin/up

Component/interface/state/admin/down

Component/interface/state/operation/up

Component/interface/state/operation/down

Routing Engine

Component/re/cpu/load_average_five/$re_mastership_state[load]

Component/re/cpu/background/$re_mastership_state[percent]

Component/re/cpu/system/$re_mastership_state[percent]

Component/re/cpu/user/$re_mastership_state[percent]

Component/re/cpu/interrupt/$re_mastership_state[percent]

Component/re/used/$re_mastership_state[percent]

Component/re/temperature/$re_mastership_state[degree]

Component/re/memory/$re_mastership_state[percent]

 

 

 

$itf_name : name of interface.

$re_mastership_state: Master or Backup

 

Device level metrics are available for interface statistics at path Component/summary/interface/$metric_name/rx or tx[unit] where metric_name = bytes, packets, unicast, multicast, broadcast and errors

 

It is very easy to get the plugin up and running, using a simple configuration that includes New Relic license key, the device credentials, and the poll time.  As soon as the plugin starts reporting device metrics to the New Relic analytics platform, the user can login to his or her New Relic account to view the reported metrics. The picture below depicts routing engine CPU utilization and interface packet in/out rate in New Relic UI.

33.png

 44.png

One plugin instance can manage approximately 50 devices, with 48 physical ports each. For large networks, it is advisable to spawn multiple plugin instances, with each instance managing up to 50 devices.

 

The plugin supports Linux platforms and has been tested with Centos 6.4 and Python 2.7.8

 

For more information on New Relic see www.newrelic.com

 

 

05.01.15
Juniper Employee

This makes it incredibly easy to monitor Juniper routers, switches, and firewalls from a single plane of glass (NewRelic) which also monitors your all of your applications and equipment from other vendors (not just networking equipment but also all the other infrastructure in your data center).  Great work!