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:
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.
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.
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.
The metric sess_pipe_overflow records the total number of sessions dropped due to session pipe overflow.
How it works?
- 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:
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.
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")
- 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