Varnish is an open source web cache accelerator. For more information visit varnish-cache.org.
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, Stackdriver Monitoring populates the Varnish Services page with inventory and metrics.
Supported Varnish Versions
Varnish is monitored by a plugin that uses the
to read statistics stored in memory from the
This library depends on the version of Varnish that you are running, and is not
compatible across versions.
Stackdriver 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 Xenial: Varnish 4.x
- Ubuntu Precise or Trusty: Varnish 3.x
- Ubuntu Lucid: Varnish 2.x
- Debian Wheezy: Varnish 3.x
- Debian Squeeze: Varnish 2.x
Configuring Stackdriver 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
(cd /opt/stackdriver/collectd/etc/collectd.d/ && curl -O https://raw.githubusercontent.com/Stackdriver/stackdriver-agent-service-configs/master/etc/collectd.d/varnish.conf)
After adding the configuration file, restart the monitoring agent by running the following command:
sudo service stackdriver-agent restart
Information on other plugin configuration options can be found at collectd.org.
What is monitored
The Varnish plugin monitors the following metrics:
- Backend Connections
- Success (count)
- Failures (count)
- Not attempted (count)
- Recycled (count)
- Reused (count)
- Too many (count)
- Unused (count)
- Was closed (count)
- Client Connections
- Accepted (count)
- Dropped (count)
- Received (count)
- Cache Statistics
- Cache hits (count)
- Cache misses (count)
- Hit pass (count)
More information on these metrics can be found at varnish-cache.org.