You are here

Integrations

Varnish Cache

Download version    6.0    5.x

Included in Opsview Monitor 5.x
Included in Opsview Monitor 6.0
check_circle
Opsview Supported

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

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.

Note: This Opspack has been tested and configured against Varnish Cache 4.0 and 5.0. To monitor Varnish Cache 3.0, use [Application - Varnish Cache 3.0 Opspack](https://github.com/opsview/application-varnish-cache-3.0 for version 3.0)

Service Checks

Service Check Description
backend_busy Checking varnish cache too many backend connections
backend_connections Checking varnish cache backend connections
backend_fail Checking varnish cache backend connections failed
backend_recycle Checking varnish cache backend connections recycled
backend_req Checking varnish cache backend requests
backend_retry Checking varnish cache backend connections retried
backend_reuse Checking varnish cache backend connections reused
backend_unhealthy Checking varnish cache backend connections not attempted
cache_hit Checking varnish cache hits
cache_hitpass Checking varnish cache hits for pass
cache_miss Checking varnish cache misses
client_requests Checking varnish cache client requests received
connected_sessions Checking varnish cache accepted connections
expired_objects Checking varnish cache number of expired objects
failed_threads Checking varnish cache hits total number of failed threads
hit_miss_ratio Checking varnish cache too many backend connections
nuked_objects Checking varnish cache number of nuked objects
session_queued Checking varnish cache sessions queued for thread
sessions_dropped Checking varnish cache dropped sessions
threads Checking varnish cache hits total number of threads
threads_limited Checking varnish cache times threads hit max
threads_queue Checking varnish cache length of session queue

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

Setup Varnish Cache for Monitoring

This Opspack uses the Opsview Linux Agent, therefore you will need the Opsview Agent installed on the same location you have Varnish Cache running.

More information on how to set up the Opsview Agent can be found on the Opsview Knowledge Center here.

Setup and Configuration

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: Add the variables for the host

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

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

Adding Variable

Step 3: Reload and view the Varnish Cache statistics

Output of metrics

v1.0-opsview-5

ODI-604 Release Opspacks to GitHub

Initial upload of existing Opspacks to GitHub

v2.0-opsview-6

ODI-1154 Release Opspacks for Opsview Monitor 6.0

Initial release of Opspack to work with Opsview Monitor 6.0