New Relic Integration

Learn how to send data emitted by New Relic to Wavefront.

New Relic is a popular APM solution for monitoring applications. The Wavefront collector supports pulling metrics from New Relic at least every minute. Application summary data can be polled every 30s, but is not guaranteed by New Relic to be updated that often.

Installation

Configuration

Open /opt/wavefront/etc/newrelic-summary.conf and /opt/wavefront/etc/newrelic-details.conf.

Set the key in the api section.

Set the application_ids in the filter section.

Set the host and dry_run values in the writer section when ready to test. Leave dry_run = True to test what would be sent to the proxy. While dry_run = True run the script in the foreground so you can see the output and press Ctrl-C to stop execution.

Running the Script

The main script is wf (which is a symlink to wave.py). It is installed by pip in /usr/local/bin on most systems.

Command Line Options

Option

Description

Default

--config FILE

Full path to the configuration file

/opt/wavefront/etc/wavefront-collector.conf

Execute

$ wf --config /opt/wavefront/etc/wavefront-collector.conf

Service Script

You can also run this as a service. A service script (/usr/local/bin/wavefront-collector) is provided in the pip installer. This script can be run with:

$ wavefront-collector [(start|stop|status|restart)]

This script assumes that you have /opt/wavefront/etc/wavefront-collector.conf (and is updated according to earlier steps).

Log Files

The default log file location is /tmp/wavefront-collector.log. This can be changed by editing the /opt/wavefront/etc/wavefront-collector.conf file.

Caching

The responses from */metrics.json API calls (the API that gets a list of metric names that are available) are cached for a day in /tmp/wfnrcache. One file is stored here per API path. The file is named by the MD5 of the API path.

Configuration Options

The default configuration files provided should be sufficient, but all configuration options available are documented here. Configuration is retrieved from and stored in an INI-formatted file with multiple sections. Each section is described in more detail below.

This configuration file also acts as a fileconfig for the logger. See fileConfig definition for more details on how to configure logging.