Integration plugin between Varnish and New Relic
Ruby Shell
Pull request Compare This branch is 25 commits ahead of varnish:master.
Latest commit 6761c7a Dec 5, 2016 @ilons committed on GitHub Merge pull request #8 from bluehaoran/develop
Update documentation, re: executable file paths
Permalink
Failed to load latest commit information.
config Add check for existing process Dec 1, 2016
.gitignore Import Varnish plugin into new framework Mar 21, 2013
Dockerfile Should be possible to test using a docker container Aug 9, 2016
Gemfile The newrelic_plugin gem is now available through the normal channels,… Jun 21, 2013
LICENSE Import Varnish plugin into new framework Mar 21, 2013
README.md Add instruction to copy executable to a bin directory. Nov 29, 2016
newrelic_varnish_plugin

README.md

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>