Plugin for Varnish Cache Monitoring

Monitor Varnish Cache servers using Site24x7 plugins and gain in-depth visibility into critical performance metrics.

Varnish Cache is a web application accelarator which is installed in front of an HTTP server to cache the contents. 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

Using "cache_miss", metric you can 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.

How it works?

  • Log-in to your Site24x7 account. Sign up here if you don't have one
  • Download and install the latest version of Site24x7 Linux agent
  • Install the Varnish Cache plugin
  • The agent will execute the Varnish Cache plugin and push the data to the Site24x7 server

Prerequisites:

  • The plugin requires Python module "psycopg2" to fetch the statistics from the Varnish Cache.

Varnish Cache plugin installation:

  • Create a directory with the name "varnish_cache", under the Site24x7 Linux agent's plugin directory - /opt/site24x7/monagent/plugins/varnish_cache
  • Download the file ""varnish_cache.py" from our GitHub repository and place it under the "varnish_cache" directory
  • Commands to perform the above step:
  • cd /opt/site24x7/monagent/plugins/
    mkdir varnish_cache
    cd varnish_cache
    wget https://github.com/site24x7/plugins/varnish_cache/varnish_cache.py

Varnish Cache plugin configuration:

  • Make the following changes in the apache plugin file "varnish_cache.py" - /opt/site24x7/monagent/plugins/varnish_cache/varnish_cache.py
  • The default python path given in the plugin script is #!/usr/bin/python. If you wish to provide an alternate python path, replace the existing one preceded by the shebang character "#!".
  • Change the values of VARNISH_HOST and VARNISH_PORT to match your configurations in the Varnish Cache plugin file (earlier copied to agent's plugin directory)
  • Save the changes and restart the agent.
  • /etc/init.d/site24x7monagent restart

Monitor additional metrics:

  • To monitor additional metrics, edit the "varnish_cache.py" file and add the new metrics that need monitoring
  • Increment the plugin version value in the file "varnish_cache.py" to view the newly added metrics ( For e.g., change the default plugin version from PLUGIN_VERSION = "1" to "PLUGIN_VERSION = "2")

Related plugins:

  • 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
Trusted

World's leading companies

Client

Don't have a Site24x7 account? Sign up now!