Online Training
Q4 2024

Nov 19 to Dec 10

11.00 AM EST: USA, UK, Canada, Mexico and Europe

06.00 AM GMT: MiddleEast, Asia and Australia

Register Now

Varnish Cache Monitoring

Monitor your Varnish setup and get in-depth stats on cache performance, work requests, and sessions.

Start 30-day free trial Try now, sign up in 30 seconds

Varnish Cache is a web application accelerator which is installed in front of a HTTP server to cache the content. Analyze and optimize your Varnish Cache servers by configuring our plugin. Proactively monitor the availability and performance of caches and work objects created.

This document details how to configure the Varnish Cache plugin and the monitoring metrics for providing in-depth visibility into the performance, availability, and usage stats of Varnish Cache ecosystems.

Varnish Cache performance monitoring metrics:

Install and configure our plugin to monitor the performance metrics of your Varnish Cache ecosystem. Use these key indicators to take informed troubleshooting decisions and ensure continuous functioning of your Varnish Cache:

Cache hits

Use the metric cache_hit to record the total number of times the cache was successfully accessed by a request. Helps in understanding the success rate in your system.

Cache misses

The cache_miss metric will record the total number of times a request was unsuccessful in accessing the cache. Helps in understanding the error rate in your system.

Worker threads

n_wrk_create records the total number of worker threads that have been created by various requests in the cache.

Queued work requests

The metric n_wrk_queued records the total number of work requests received to the cache that are currently queued.

Sessions dropped

The metric sess_pipe_overflow records the total number of sessions dropped due to session pipe overflow.

Prerequisite

  • Ensure the Python module "psycopg2" is installed to fetch the stats from the Varnish Cache server.

Plugin Installation

  • Download and install the latest version of the Site24x7 Linux agent in the server where you plan to run the plugin. If it is installed successfully, you will see a Linux server monitor in the Site24x7 Control Panel. This confirms that the agent is able to communicate with our data center.
  • Download the file varnish_cache.py from our GitHub repository.
  • Create a directory with the name 'varnish_cache', under the Site24x7 Linux agent's plugin directory '/opt/site24x7/monagent/plugins/varnish_cache' and place the 'varnish_cache.py' under '/opt/site24x7/monagent/plugins/varnish_cache.
The agent will automatically execute the plugin within five minutes and send performance data to the Site24x7 data center.

View Data in the Site24x7 Web Client

  1. Log in to Site24x7 and go to Server > Plugins > Name of Plugin Monitor
  2. You will be able to view the performance charts on the various metrics for your Varnish Cache server.

Customize your Plugin

To add/delete an attribute, or change its unit, edit the 'varnish_cache.py' file, make the desired changes and increment the plugin version. From the next consecutive data collection, the changes would be reflected.

Plugin Contribution

Feel free to contribute to our existing plugin and come up with suggestions or feedback on our Community.

Other Plugin Integrations

  • Redis plugin - Monitor performance metrics of your Redis databases
  • MongoDB plugin - Monitor performance metrics of your MongoDB databases
  • Memcached plugin - Analyze performance of your Memcached server
  • Nagios plugin - Execute thousands of Nagios plugins in Site24x7 without the need of running a Nagios server
  • Out-of-the-box plugins - Monitor your entire app stack with our extensive list of integrations
  • Create custom plugins - Create custom Linux and Windows plugins and monitor custom attributes