Varnish plugin

Varnish is an open source web cache accelerator. For more information visit

This functionality is only available for agents running on Linux. It is not available on Windows.


You must configure the Varnish plugin for the monitoring agent in order to monitor Varnish.

The services discovered are displayed on the Varnish Services page in the Resources menu. After you install the monitoring agent and configure the Varnish plugin on your instances, Cloud Monitoring populates the Varnish Services page with inventory and metrics.

Supported Varnish Versions

Varnish is monitored by a plugin that uses the libvarnish library to read statistics stored in memory from the varnish daemon. This library depends on the version of Varnish that you are running, and is not compatible across versions. Monitoring only supports the version of Varnish that is shipped by default with the following Linux distributions:

  • Red Hat Enterprise Linux 7.x, CentOS 7.x: Varnish 3.x
  • Red Hat Enterprise Linux 6.x, CentOS 6.x: Varnish 2.x
  • Ubuntu 18.04 Bionic: Varnish 5.x (partial support)
  • Ubuntu 16.04 Xenial: Varnish 4.x
  • Ubuntu 14.04 Trusty or Ubuntu 12.04 Precise: Varnish 3.x
  • Debian 9 (Stretch): Varnish 5.x (partial support)
  • Debian 8 (Jessie): Varnish 4.x
  • Debian 7 (Wheezy): Varnish 3.x

Configuring Monitoring to monitor Varnish

After you install the monitoring agent, use the following instructions to configure the Varnish plugin on your instances.


The Varnish plugin requires version 5.5.0-315 or later of the monitoring agent. To update the agent, see Upgrading the agent.

Enabling the Varnish monitoring plugin

On your VM instance, download varnish.conf from the GitHub configuration repository and place it in the directory /etc/stackdriver/collectd.d/:

(cd /etc/stackdriver/collectd.d/ && sudo curl -O

After adding the configuration file, restart the monitoring agent by running the following command:

sudo service stackdriver-agent restart

For more information on the collectd varnish plugin, see Plugin:Varnish.

What is monitored

The full list of metrics the Varnish plugin monitors is at Agent metrics: varnish.

More information on these metrics can also be found at