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.
- 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}"
- Install required Ruby gems (json, newrelic_plugin, bundler):
bundle install
- 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
- Edit the configuration file and fill in your New Relic license key (and any other desired options)
- Copy the executable
newrelic_varnish_plugin
to an appropriate place, e.g./usr/local/bin/newrelic_varnish_plugin
- 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. - 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
- 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
To build install the plugin in an isolated environment:
- Install docker
docker build .
docker run --rm -it <build image id>