You are here

Integrations

Varnish Cache

Included in Opsview Monitor 5.4
check_circle
Opsview Supported
by Genaro Bedenko

Varnish Cache Opspack

Varnish Cache is a HTTP accelerator designed for dynamic, content-heavy web sites as well as heavily consumed APIs. You can install it in front of any server that speaks HTTP and configure it to cache the contents. It typically speeds up delivery with a factor of 300 - 1000x, depending on your architecture. In addition to its performance, one of the key features of Varnish Cache is the flexibility of VCL (its configuration language). VCL enables you to write policies on how incoming requests should be handled.

What You Can Monitor

Our Varnish Cache Opspack allows you to pull vital information from your environment including connection information, number of sessions/client requests, thread statistics and much more.

This Opspack has been tested and configured against Varnish Cache 4.0 and 5.0 (See https://github.com/opsview/application-varnish-cache-3.0 for version 3.0)

Service Checks

Service Check
Session_Connections
Sessions_Dropped
Session_Queued
Client_Requests
Cache_Hit
Cache_Miss
Cache_Hitpass
Cache_Hit_Ratio
Expired_Objects
Nuked_Objects
Threads
Failed_Threads
Threads_Limited
Threads_Queue
Backend_Connections
Backend_Reuse
Backend_Recycle
Backend_Fail
Backend_Unhealthy
Backend_Busy
Backend_Requests
Backend_Retries

Setup and Configuration

On the Varnish Cache box

To add the Varnish Cache plugin to your Opsview agent.

First, you need to add the plugin to the correct file directory at /usr/local/nagios/libexec/, which is the default location of the installed Opsview plugins.

Next, give the plugin execution rights by running the command chmod u+x check_varnish. The plugin also needs to be owned by the Nagios user and group, which can be changed by running the command chown nagios:nagios check_varnish.

Next add the plugin details to the configuration by adding the line

command[check_varnish]=/usr/local/nagios/libexec/check_varnish $ARG1$

to the nrpe.cfg file located at /usr/local/nagios/etc/.

Restart the Opsview plugin with the command service opsview-agent restart.

Allow access to the Varnish stats by running the command chmod a+x /var/lib/varnish/_.vsm, if the _.vsm file is in the default location and if this file doesn't have execution access already, this will allow the agent access to the commands it needs.

On the Opsview master

To configure and utilize this Opspack, you need to add the 'Application - Varnish Cache' Opspack to the host running the Varnish Cache software

Step 1: Add the host template

Adding Host Template

Step 2: If you are running multiple instances of Varnish Cache, you can add the variable VARNISHCACHE_INSTANCE and give the name of the Varnish instance.

Adding Variable

For every instance you will have to create a new host and add the VARNISHCACHE_INSTANCE variable.

Step 3: Reload and view the Varnish Cache statistics Output of metrics

v1.0-opsview-6

ODI-1154 Release Opspacks for Opsview Monitor 6.0

Initial release of Opspack to work with Opsview Monitor 6.0

v1.0-opsview-5

ODI-604 Release Opspacks to GitHub

Initial upload of existing Opspacks to GitHub