varnish-mib

A dynamically loadable object module for Net SNMP that provides statistics and management capabilities for Varnish Cache.  The MIBs contain all vital Varnish statistics, including detailed ban tables and allow to configure bans remotely.

To configure, the following statement should be added to the /etc/snmp/snmpd.conf file:

dlmod varnish_mib /usr/lib/snmp/varnish−mib.so

Example of information returned: 

$ snmpwalk -Oq host.example.com VARNISH-MIB::varnish

VARNISH-MIB::clientAcceptedConnections.0 3947926
VARNISH-MIB::clientRequestsReceived.0 16706242
VARNISH-MIB::clientCacheHits.0 15430423
VARNISH-MIB::clientCacheHitsPass.0 116
VARNISH-MIB::clientCacheMisses.0 649778
VARNISH-MIB::backendConnSuccess.0 397795
VARNISH-MIB::backendConnNotAttempted.0 0
VARNISH-MIB::backendConnToMany.0 0
VARNISH-MIB::backendConnFailures.0 91
VARNISH-MIB::backendConnReuses.0 887240
VARNISH-MIB::backendConnRecycled.0 1010076
VARNISH-MIB::backendConnUnused.0 122806
VARNISH-MIB::backendConnRetry.0 44
VARNISH-MIB::uptime.0 0:2:35:06.29

[...more info follows...]

Setting a ban:

snmpset host.example.com VARNISH-MIB::clientBan.0 s 'obj.url ~ ".png$"'

Detailed documentation is available online.


Licence: 
Status: 
Used in production
Varnish version supported: 
Commercial support: 
NXC International
Category: 
Monitoring+Statistics