Skip to content

Latest commit

 

History

History
32 lines (25 loc) · 1.9 KB

README.md

File metadata and controls

32 lines (25 loc) · 1.9 KB

New Relic Varnish Extension

This is a fork of the original which no longer seems to be maintained

This runs on the Varnish server and reports the values from varnishstat back into New Relic.

Tested with Varnish version 3.

Instructions for running the Varnish extension agent

  1. Download (or clone) and uncompress the latest release, currently v0.2: RELEASE="v0.2" && wget "https://github.com/ilons/newrelic_varnish_plugin/archive/${RELEASE}.tar.gz" -O - | tar -zxvz && cd "newrelic_varnish_plugin-${RELEASE}"
  2. Install required Ruby gems (json, newrelic_plugin, bundler): bundle install
  3. Copy the config config/template_newrelic_plugin.yml to the appropriate place, for example /etc/newrelic/newrelic_varnish_plugin.yml cp config/template_newrelic_plugin.yml /etc/newrelic/newrelic_varnish_plugin.yml
  4. Edit the configuration file and fill in your New Relic license key (and any other desired options)
  5. Copy the executable newrelic_varnish_plugin to an appropriate place, e.g. /usr/local/bin/newrelic_varnish_plugin
  6. Optionally, Install daemon: cp config/newrelic_varnish_plugin_daemon.sh /etc/init.d/newrelic-varnish.sh && chmod +x /etc/init.d/newrelic-varnish. If so, update the values of DAEMON and CONFIG to the locations you used in step 5 and step 3 respectively.
  7. Execute plugin agent (use -h for usage hints) /usr/local/bin/newrelic_varnish_plugin -c /etc/newrelic/newrelic_varnish.yml -p /var/run/newrelic_varnish.pid && service newrelic-varnish start
  8. Go back to the Extensions list and after a brief period you will see an entry for your extension

Data should now get reported to your New Relic account

Testing / Development

To build install the plugin in an isolated environment:

  1. Install docker
  2. docker build .
  3. docker run --rm -it <build image id>