summaryrefslogtreecommitdiffabout
authorSergey Poznyakoff <gray@gnu.org.ua>2014-11-24 15:27:51 (GMT)
committer Sergey Poznyakoff <gray@gnu.org.ua>2014-11-24 15:27:51 (GMT)
commit02b329d67dd593ddc8d41b52372fc7beb8c79f70 (patch) (side-by-side diff)
tree3e65a1402eff0281cbbee5f25acd80531a49b265
parentb3759f3dd958e453dfa3a12e6ab3cb3a48430cc2 (diff)
downloadvarnish-mib-02b329d67dd593ddc8d41b52372fc7beb8c79f70.tar.gz
varnish-mib-02b329d67dd593ddc8d41b52372fc7beb8c79f70.tar.bz2
Add more objects to the MIB
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--src/VARNISH-MIB.txt256
-rw-r--r--src/varnish_mib.mib2c43
2 files changed, 281 insertions, 18 deletions
diff --git a/src/VARNISH-MIB.txt b/src/VARNISH-MIB.txt
index 4732745..eff533b 100644
--- a/src/VARNISH-MIB.txt
+++ b/src/VARNISH-MIB.txt
@@ -1,7 +1,7 @@
VARNISH-MIB DEFINITIONS ::= BEGIN
-- *************************************************************
--- $Id: VARNISH-MIB.txt,v 1.5 2009/03/07 09:44:10 mhe Exp $
+-- $Id: VARNISH-MIB.txt 8 2014-11-24 14:38:24Z graygnuorg $
--
-- Varnish reverse proxy MIB
-- by Shared Autonomous sYstems
@@ -9,18 +9,18 @@ VARNISH-MIB DEFINITIONS ::= BEGIN
-- *************************************************************
IMPORTS
- MODULE-IDENTITY, OBJECT-TYPE, enterprises, Counter64
+ MODULE-IDENTITY, OBJECT-TYPE, enterprises, Counter64, TimeTicks
FROM SNMPv2-SMI
OBJECT-GROUP, MODULE-COMPLIANCE
FROM SNMPv2-CONF;
varnishMIB MODULE-IDENTITY
- LAST-UPDATED "201411191934Z"
+ LAST-UPDATED "201411241627Z"
ORGANIZATION "Shared Autonomous sYstems"
CONTACT-INFO "mhe@say.no"
DESCRIPTION
"This MIB module defines objects for Varnish reverse web proxy."
- REVISION "201411191934Z"
+ REVISION "201411241627Z"
DESCRIPTION
"Initial version."
::= { varnish 0 }
@@ -29,6 +29,9 @@ varnish OBJECT IDENTIFIER ::= { enterprises 33043 6 1 }
client OBJECT IDENTIFIER ::= { varnish 1 }
backend OBJECT IDENTIFIER ::= { varnish 2 }
total OBJECT IDENTIFIER ::= { varnish 3 }
+master OBJECT IDENTIFIER ::= { varnish 4 }
+session OBJECT IDENTIFIER ::= { varnish 5 }
+threads OBJECT IDENTIFIER ::= { varnish 6 }
clientAcceptedConnections OBJECT-TYPE
SYNTAX Counter64
@@ -78,6 +81,39 @@ clientBan OBJECT-TYPE
"When set, invalidates the cache using the supplied value as
argument to ban. When read, returns an empty string."
::= { client 6 }
+
+clientRequests400 OBJECT-TYPE
+ SYNTAX Counter64
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION
+ "Client requests received, subject to 400 errors"
+ ::= { client 7 }
+
+clientRequests411 OBJECT-TYPE
+ SYNTAX Counter64
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION
+ "Client requests received, subject to 411 errors"
+ ::= { client 8 }
+
+
+clientRequests413 OBJECT-TYPE
+ SYNTAX Counter64
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION
+ "Client requests received, subject to 413 errors"
+ ::= { client 9 }
+
+clientRequests417 OBJECT-TYPE
+ SYNTAX Counter64
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION
+ "Client requests received, subject to 417 errors"
+ ::= { client 10 }
connections OBJECT IDENTIFIER ::= { backend 1 }
@@ -136,7 +172,15 @@ backendConnUnused OBJECT-TYPE
DESCRIPTION
"Backend connections unused"
::= { connections 7 }
-
+
+backendConnRetry OBJECT-TYPE
+ SYNTAX Counter64
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION
+ "Backend connections retried"
+ ::= { connections 8 }
+
totalSessions OBJECT-TYPE
SYNTAX Counter64
MAX-ACCESS read-only
@@ -177,22 +221,183 @@ totalFetch OBJECT-TYPE
"Total fetch"
::= { total 5 }
-totalHeaderBytes OBJECT-TYPE
+totalRequestHeaderBytes OBJECT-TYPE
SYNTAX Counter64
MAX-ACCESS read-only
STATUS current
DESCRIPTION
- "Total header bytes"
+ "Total request header bytes"
::= { total 6 }
-totalBodyBytes OBJECT-TYPE
+totalRequestBodyBytes OBJECT-TYPE
SYNTAX Counter64
MAX-ACCESS read-only
STATUS current
DESCRIPTION
- "Total body bytes"
+ "Total request body bytes"
::= { total 7 }
-
+
+totalResponseHeaderBytes OBJECT-TYPE
+ SYNTAX Counter64
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION
+ "Total response body bytes"
+ ::= { total 8 }
+
+totalResponseBodyBytes OBJECT-TYPE
+ SYNTAX Counter64
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION
+ "Total response body bytes"
+ ::= { total 9 }
+
+uptime OBJECT-TYPE
+ SYNTAX TimeTicks
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION
+ "Master daemon uptime"
+ ::= { master 1 }
+
+sessAccepted OBJECT-TYPE
+ SYNTAX Counter64
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION
+ "Number of sessions succesfully accepted"
+ ::= { session 1 }
+
+sessQueued OBJECT-TYPE
+ SYNTAX Counter64
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION
+ "Number of times session was queued waiting for a thread"
+ ::= { session 2 }
+
+sessDropped OBJECT-TYPE
+ SYNTAX Counter64
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION
+ "Number of sessions dropped because session queue was full"
+ ::= { session 3 }
+
+sessClosed OBJECT-TYPE
+ SYNTAX Counter64
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION
+ "Number of sessions closed"
+ ::= { session 4 }
+
+sessPipeline OBJECT-TYPE
+ SYNTAX Counter64
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION
+ "Session pipeline"
+ ::= { session 5 }
+
+sessReadAhead OBJECT-TYPE
+ SYNTAX Counter64
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION
+ "Session read-ahead"
+ ::= { session 6 }
+
+sessHerd OBJECT-TYPE
+ SYNTAX Counter64
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION
+ "Session herd"
+ ::= { session 7 }
+
+sessDrop OBJECT-TYPE
+ SYNTAX Counter64
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION
+ "Number of sessions dropped for thread"
+ ::= { session 8 }
+
+sessFail OBJECT-TYPE
+ SYNTAX Counter64
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION
+ "Number of session accept failures"
+ ::= { session 9 }
+
+sessPipeOverflow OBJECT-TYPE
+ SYNTAX Counter64
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION
+ "Number of session pipe overflows"
+ ::= { session 10 }
+
+threadsPools OBJECT-TYPE
+ SYNTAX Counter64
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION
+ "Number of thread pools"
+ ::= { threads 1 }
+
+threadsTotal OBJECT-TYPE
+ SYNTAX Counter64
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION
+ "Number of thread pools"
+ ::= { threads 2 }
+
+threadsLimitHits OBJECT-TYPE
+ SYNTAX Counter64
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION
+ "Number of times more threads were needed, but limit was
+ reached in a thread pool"
+ ::= { threads 3 }
+
+threadsCreated OBJECT-TYPE
+ SYNTAX Counter64
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION
+ "Total number of threads created in all pools"
+ ::= { threads 4 }
+
+threadsDestroyed OBJECT-TYPE
+ SYNTAX Counter64
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION
+ "Total number of threads destroyed in all pools"
+ ::= { threads 5 }
+
+threadsFailed OBJECT-TYPE
+ SYNTAX Counter64
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION
+ "Number of times creating a thread failed"
+ ::= { threads 6 }
+
+threadsQueueLength OBJECT-TYPE
+ SYNTAX Counter64
+ MAX-ACCESS read-only
+ STATUS current
+ DESCRIPTION
+ "Length of session queue waiting for threads"
+ ::= { threads 7 }
+
--
-- Groups and Compliance
--
@@ -223,8 +428,35 @@ varnishGroup OBJECT-GROUP
totalPipe,
totalPass,
totalFetch,
- totalHeaderBytes,
- totalBodyBytes}
+ clientRequests400,
+ clientRequests411,
+ clientRequests413,
+ clientRequests417,
+ backendConnRetry,
+ totalRequestHeaderBytes,
+ totalRequestBodyBytes,
+ totalResponseHeaderBytes,
+ totalResponseBodyBytes,
+ uptime,
+ sessAccepted,
+ sessQueued,
+ sessDropped,
+ sessClosed,
+ sessPipeline,
+ sessReadAhead,
+ sessHerd,
+ sessDrop,
+ sessFail,
+ sessPipeOverflow,
+ threadsPools,
+ threadsTotal,
+ threadsLimitHits,
+ threadsCreated,
+ threadsDestroyed,
+ threadsFailed,
+ threadsQueueLength
+
+ }
STATUS current
DESCRIPTION "Group of Varnish objects"
diff --git a/src/varnish_mib.mib2c b/src/varnish_mib.mib2c
index 1bb91ce..6da2487 100644
--- a/src/varnish_mib.mib2c
+++ b/src/varnish_mib.mib2c
@@ -49,6 +49,7 @@ varnish_snmp_deinit(void)
$vars{'varnish_translate'} = sub {
my $name = shift;
my %trans = (
+ uptime => [ 'MAIN', 'uptime' ],
clientAcceptedConnections => [ 'MAIN', 'sess_conn' ],
clientRequestsReceived => [ 'MAIN', 'client_req' ],
clientCacheHits => [ 'MAIN', 'cache_hit' ],
@@ -56,6 +57,14 @@ $vars{'varnish_translate'} = sub {
clientCacheMisses => [ 'MAIN', 'cache_miss' ],
clientBan => [ 'STRING', '',
{ varnish_set_action => 'varnish_ban' } ],
+
+ clientRequestsReceived => [ 'MAIN', 'client_req' ],
+ clientRequests400 => [ 'MAIN', 'client_req_400' ],
+ clientRequests411 => [ 'MAIN', 'client_req_411' ],
+ clientRequests413 => [ 'MAIN', 'client_req_413' ],
+ clientRequests417 => [ 'MAIN', 'client_req_417' ],
+
+
backendConnSuccess => [ 'MAIN', 'backend_conn' ],
backendConnNotAttempted => [ 'MAIN', 'backend_unhealthy' ],
backendConnToMany => [ 'MAIN', 'backend_busy' ],
@@ -63,13 +72,38 @@ $vars{'varnish_translate'} = sub {
backendConnReuses => [ 'MAIN', 'backend_reuse' ],
backendConnRecycled => [ 'MAIN', 'backend_recycle' ],
backendConnUnused => [ 'MAIN', 'backend_toolate' ],
+ backendConnRetry => [ 'MAIN', 'backend_retry' ],
+
totalSessions => [ 'MAIN', 's_sess' ],
totalRequests => [ 'MAIN', 's_req' ],
totalPipe => [ 'MAIN', 's_pipe' ],
totalPass => [ 'MAIN', 's_pass' ],
totalFetch => [ 'MAIN', 's_fetch' ],
- totalHeaderBytes => [ 'MAIN', 's_req_hdrbytes' ],
- totalBodyBytes => [ 'MAIN', 's_req_bodybytes' ]
+ totalRequestHeaderBytes => [ 'MAIN', 's_req_hdrbytes' ],
+ totalRequestBodyBytes => [ 'MAIN', 's_req_bodybytes' ],
+ totalResponseHeaderBytes => [ 'MAIN', 's_resp_hdrbytes' ],
+ totalResponseBodyBytes => [ 'MAIN', 's_resp_bodybytes' ],
+
+ sessAccepted => [ 'MAIN', 'sess_conn'],
+ sessQueued => [ 'MAIN', 'sess_queued'],
+ sessDropped => [ 'MAIN', 'sess_dropped'],
+ sessClosed => [ 'MAIN', 'sess_closed'],
+ sessPipeline => [ 'MAIN', 'sess_pipeline'],
+ sessReadAhead => [ 'MAIN', 'sess_readahead'],
+ sessHerd => [ 'MAIN', 'sess_herd'],
+ sessDrop => [ 'MAIN', 'sess_drop'],
+ sessFail => [ 'MAIN', 'sess_fail'],
+ sessPipeOverflow => [ 'MAIN', 'sess_pipe_overflow'],
+
+ threadsPools => [ 'MAIN', 'pools'],
+ threadsTotal => [ 'MAIN', 'threads'],
+ threadsLimitHits => [ 'MAIN', 'threads_limited'],
+ threadsCreated => [ 'MAIN', 'threads_created'],
+ threadsDestroyed => [ 'MAIN', 'threads_destroyed'],
+ threadsFailed => [ 'MAIN', 'threads_failed'],
+ threadsQueueLength => [ 'MAIN', 'thread_queue_len']
+
+
);
my $r = $trans{$name};
@@ -80,8 +114,6 @@ $vars{'varnish_translate'} = sub {
$vars{'varnish_type'} = $r->[0];
$vars{'varnish_member'} = $r->[1];
- my $setkw = qw(varnish_set_reserve2 varnish_set_free varnish_set_action
- varnish_set_commit varnish_set_undo);
if ($#{$r} == 2) {
@vars{keys %{$r->[2]}} = values %{$r->[2]};
} else {
@@ -101,8 +133,7 @@ print "$vars{'modulename'}\n";
/* Variable handlers.
An instance handler only hands us one request at a time, unwrapping
- any eventual GETNEXT requests. All OIDs are read-only, so the handlers
- should only handle GET requests.
+ any eventual GETNEXT requests.
*/
@foreach $i scalar@

Return to:

Send suggestions and report system problems to the System administrator.