Guest author Subha Krishnan is a software engineer at Juniper Networks.

The growing complexity of corporate networks can make it difficult to provide visibility into what is happening across the entire infrastructure. Yet it is extremely important to know the performance, resource utilization, and health of network devices in order to help prevent outages, troubleshoot issues, and perform network planning.

The Juniper plugin for New Relic is designed to help address that problem by providing valuable insights into the overall network environment. It monitors and trends metrics from Juniper devices such as the EX-Series and QFX-Series switches, and the MX-Series routers. The plugin agent sends the collected metrics up to the New Relic cloud. You can then log in to your New Relic account to view the reported metrics. The diagram below depicts how the agent communicates with New Relic.

juniper diagram

Technologies used

The Juniper plugin agent 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 routers and switches running Junos support NETCONF with consistent data models. See Juniper documentation for more details on NETCONF support in Junos (the operating system for Juniper devices).

The agent 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. You can find more information on Py-Junos-Eznc on Github.

Metrics reported

The plugin agent periodically polls Juniper devices and gathers various statistics. The metrics include routing engine statistics (memory and CPU utilization, for example) and physical interface statistics (including bytes-in per second, bytes-out per second, packets-in per second, and packets-out per second). The table below depicts the metrics tracked by the plugin and the corresponding New Relic key paths:

Metrics Type

NR Path



Routing Engine


$itf_name: name of interface.
$re_mastership_state: Master or Backup

Getting started

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

Juniper has open sourced the agent on Github at using a permissive Apache 2.0 license.

The agent can be installed using the following PIP command:

pip install $path/jnpr_nr_plugin_1.0.0.tar.gz

It is very easy to get the plugin agent up and running, using a simple configuration that includes New Relic license key, the device credentials, and the poll time. A sample configuration file is included in the pre-packaged archive.

The agent can be started using the following command:

jnpr_nr_plugin –c $path_to_config_file

The agent can be daemonized as a service. Example init.d configuration for Linux Red-hat can be found at

As soon as the agent starts reporting Juniper device metrics to New Relic, users can log in to their New Relic account to view reported metrics. The picture below depicts sample routing-engine CPU utilization and interface packet in/out rate for a device, as displayed in the New Relic UI.

juniper new relic plugin charts

[click to enlarge]

An agent 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 50 devices.

For more information, contact

Click here for more information on New Relic plugins and to see the full list of more than 100 plugins.


Image courtesy of

Guest author Subha Krishnan is a software engineer at Juniper Networks. Connect with Subha on LinkedIn. View posts by .

Interested in writing for New Relic Blog? Send us a pitch!