summaryrefslogtreecommitdiffabout
path: root/src
authorSergey Poznyakoff <gray@nxc.no>2018-02-05 19:56:59 (GMT)
committer Sergey Poznyakoff <gray@nxc.no>2018-02-05 19:56:59 (GMT)
commitf7677f32b90eea37e54b39a3e26e5437924a2ada (patch) (unidiff)
tree4112eecd0acecd664e613fd1b66dd177b7ab87ba /src
parent027e83b6f5dc6a63ed9c69e534c0b994041df14f (diff)
downloadvarnish-mib-f7677f32b90eea37e54b39a3e26e5437924a2ada.tar.gz
varnish-mib-f7677f32b90eea37e54b39a3e26e5437924a2ada.tar.bz2
Version 2.0
Diffstat (limited to 'src') (more/less context) (ignore whitespace changes)
-rw-r--r--src/Makefile.am2
-rw-r--r--src/VARNISH-MIB.txt6
-rw-r--r--src/auth.c2
-rw-r--r--src/backend.h3
-rw-r--r--src/ban.c2
-rw-r--r--src/belex.l17
-rw-r--r--src/modconf.c17
-rw-r--r--src/varnish-mib.885
-rw-r--r--src/vcli.c2
9 files changed, 99 insertions, 37 deletions
diff --git a/src/Makefile.am b/src/Makefile.am
index 55cdb85..5c79dfc 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -1,14 +1,14 @@
1# This file is part of varnish-mib -*- automake -*- 1# This file is part of varnish-mib -*- automake -*-
2# Copyright (C) 2014-2015 Sergey Poznyakoff 2# Copyright (C) 2014-2018 Sergey Poznyakoff
3# 3#
4# varnish-mib is free software; you can redistribute it and/or modify 4# varnish-mib is free software; you can redistribute it and/or modify
5# it under the terms of the GNU General Public License as published by 5# it under the terms of the GNU General Public License as published by
6# the Free Software Foundation; either version 3, or (at your option) 6# the Free Software Foundation; either version 3, or (at your option)
7# any later version. 7# any later version.
8# 8#
9# varnish-mib is distributed in the hope that it will be useful, 9# varnish-mib is distributed in the hope that it will be useful,
10# but WITHOUT ANY WARRANTY; without even the implied warranty of 10# but WITHOUT ANY WARRANTY; without even the implied warranty of
11# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12# GNU General Public License for more details. 12# GNU General Public License for more details.
13# 13#
14# You should have received a copy of the GNU General Public License 14# You should have received a copy of the GNU General Public License
diff --git a/src/VARNISH-MIB.txt b/src/VARNISH-MIB.txt
index 6b03f21..b7e77f1 100644
--- a/src/VARNISH-MIB.txt
+++ b/src/VARNISH-MIB.txt
@@ -11,32 +11,32 @@ VARNISH-MIB DEFINITIONS ::= BEGIN
11IMPORTS 11IMPORTS
12 MODULE-IDENTITY, OBJECT-TYPE, enterprises, Counter64, TimeTicks, 12 MODULE-IDENTITY, OBJECT-TYPE, enterprises, Counter64, TimeTicks,
13 Counter32, Integer32 13 Counter32, Integer32
14 FROM SNMPv2-SMI 14 FROM SNMPv2-SMI
15 TEXTUAL-CONVENTION, DateAndTime 15 TEXTUAL-CONVENTION, DateAndTime
16 FROM SNMPv2-TC 16 FROM SNMPv2-TC
17 InetAddressIPv4, InetAddressIPv6, InetPortNumber 17 InetAddressIPv4, InetAddressIPv6, InetPortNumber
18 FROM INET-ADDRESS-MIB 18 FROM INET-ADDRESS-MIB
19 OBJECT-GROUP, MODULE-COMPLIANCE 19 OBJECT-GROUP, MODULE-COMPLIANCE
20 FROM SNMPv2-CONF; 20 FROM SNMPv2-CONF;
21 21
22varnishMIB MODULE-IDENTITY 22varnishMIB MODULE-IDENTITY
23 LAST-UPDATED "201802020845Z" 23 LAST-UPDATED "201802052024Z"
24 ORGANIZATION "Shared Autonomous sYstems" 24 ORGANIZATION "Shared Autonomous sYstems"
25 CONTACT-INFO "Morten Hermanrud <mhe@say.no> 25 CONTACT-INFO "Morten Hermanrud <mhe@say.no>
26 Sergey Poznyakoff <gray@gnu.org> 26 Sergey Poznyakoff <gray@gnu.org>
27 " 27 "
28 DESCRIPTION 28 DESCRIPTION
29 "This MIB module defines objects for Varnish reverse web proxy." 29 "This MIB module defines objects for Varnish reverse web proxy."
30 REVISION "201802020845Z" 30 REVISION "201802052024Z"
31 DESCRIPTION 31 DESCRIPTION
32 "Second revision." 32 "Second revision."
33 ::= { varnish 0 } 33 ::= { varnish 0 }
34 34
35 varnish OBJECT IDENTIFIER::= { enterprises 33043 6 1 } 35 varnish OBJECT IDENTIFIER::= { enterprises 33043 6 1 }
36 client OBJECT IDENTIFIER::= { varnish 1 } 36 client OBJECT IDENTIFIER::= { varnish 1 }
37 backend OBJECT IDENTIFIER::= { varnish 2 } 37 backend OBJECT IDENTIFIER::= { varnish 2 }
38 total OBJECT IDENTIFIER::= { varnish 3 } 38 total OBJECT IDENTIFIER::= { varnish 3 }
39 master OBJECT IDENTIFIER::= { varnish 4 } 39 master OBJECT IDENTIFIER::= { varnish 4 }
40 session OBJECT IDENTIFIER::= { varnish 5 } 40 session OBJECT IDENTIFIER::= { varnish 5 }
41 threads OBJECT IDENTIFIER::= { varnish 6 } 41 threads OBJECT IDENTIFIER::= { varnish 6 }
42 bans OBJECT IDENTIFIER::= { varnish 7 } 42 bans OBJECT IDENTIFIER::= { varnish 7 }
@@ -845,25 +845,25 @@ objectsLRUMoved OBJECT-TYPE
845 SYNTAX Counter64 845 SYNTAX Counter64
846 MAX-ACCESS read-only 846 MAX-ACCESS read-only
847 STATUS current 847 STATUS current
848 DESCRIPTION 848 DESCRIPTION
849 "Number of move operations done on the LRU list." 849 "Number of move operations done on the LRU list."
850 ::= { objects 7 } 850 ::= { objects 7 }
851 851
852objectsPurges OBJECT-TYPE 852objectsPurges OBJECT-TYPE
853 SYNTAX Counter64 853 SYNTAX Counter64
854 MAX-ACCESS read-only 854 MAX-ACCESS read-only
855 STATUS current 855 STATUS current
856 DESCRIPTION 856 DESCRIPTION
857 "Number of purge operations executed" 857 "Number of purge operations executed."
858 ::= { objects 8 } 858 ::= { objects 8 }
859 859
860objectsObjPurged OBJECT-TYPE 860objectsObjPurged OBJECT-TYPE
861 SYNTAX Counter64 861 SYNTAX Counter64
862 MAX-ACCESS read-only 862 MAX-ACCESS read-only
863 STATUS current 863 STATUS current
864 DESCRIPTION 864 DESCRIPTION
865 "Number of purged objects." 865 "Number of purged objects."
866 ::= { objects 9 } 866 ::= { objects 9 }
867 867
868objectsGzip OBJECT-TYPE 868objectsGzip OBJECT-TYPE
869 SYNTAX Counter64 869 SYNTAX Counter64
diff --git a/src/auth.c b/src/auth.c
index e9abbe4..2ff6aba 100644
--- a/src/auth.c
+++ b/src/auth.c
@@ -1,14 +1,14 @@
1/* This file is part of varnish-mib -*- c -*- 1/* This file is part of varnish-mib -*- c -*-
2 Copyright (C) 2014-2015 Sergey Poznyakoff 2 Copyright (C) 2014-2018 Sergey Poznyakoff
3 3
4 Varnish-mib is free software; you can redistribute it and/or modify 4 Varnish-mib is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by 5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 3, or (at your option) 6 the Free Software Foundation; either version 3, or (at your option)
7 any later version. 7 any later version.
8 8
9 Varnish-mib is distributed in the hope that it will be useful, 9 Varnish-mib is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of 10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details. 12 GNU General Public License for more details.
13 13
14 You should have received a copy of the GNU General Public License 14 You should have received a copy of the GNU General Public License
diff --git a/src/backend.h b/src/backend.h
index d60f613..b13e644 100644
--- a/src/backend.h
+++ b/src/backend.h
@@ -1,16 +1,15 @@
1typedef struct be_string { 1typedef struct be_string {
2 char const *start; 2 char const *start;
3 size_t len; 3 size_t len;
4} be_string_t; 4} be_string_t;
5 5
6typedef void (*regfun_t)(be_string_t *, be_string_t *, be_string_t *, void *); 6typedef void (*regfun_t)(be_string_t *, be_string_t *, be_string_t *, void *);
7 7
8void read_defs(const char *str, size_t len, regfun_t regfun, void *d); 8struct vsm;
9void varnish_backend_table_timeout_parser(const char *token, char *line);
10struct VSC_point; 9struct VSC_point;
11void backend_register(char const *name, size_t len, char const *param, 10void backend_register(char const *name, size_t len, char const *param,
12 const struct VSC_point *vpt); 11 const struct VSC_point *vpt);
13void backend_clear(void); 12void backend_clear(void);
14int backend_collect_addr(struct vsm *vsm); 13int backend_collect_addr(struct vsm *vsm);
15void backend_parser(const char *str, size_t len, regfun_t regfun, void *d); 14void backend_parser(const char *str, size_t len, regfun_t regfun, void *d);
16 15
diff --git a/src/ban.c b/src/ban.c
index 1f4583b..a50b5a3 100644
--- a/src/ban.c
+++ b/src/ban.c
@@ -1,14 +1,14 @@
1/* This file is part of varnish-mib -*- c -*- 1/* This file is part of varnish-mib -*- c -*-
2 Copyright (C) 2014-2015 Sergey Poznyakoff 2 Copyright (C) 2014-2018 Sergey Poznyakoff
3 3
4 Varnish-mib is free software; you can redistribute it and/or modify 4 Varnish-mib is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by 5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 3, or (at your option) 6 the Free Software Foundation; either version 3, or (at your option)
7 any later version. 7 any later version.
8 8
9 Varnish-mib is distributed in the hope that it will be useful, 9 Varnish-mib is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of 10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details. 12 GNU General Public License for more details.
13 13
14 You should have received a copy of the GNU General Public License 14 You should have received a copy of the GNU General Public License
diff --git a/src/belex.l b/src/belex.l
index f35f114..bc0bfc0 100644
--- a/src/belex.l
+++ b/src/belex.l
@@ -1,12 +1,29 @@
1/* This file is part of varnish-mib
2 Copyright (C) 2018 Sergey Poznyakoff
3
4 Varnish-mib is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 3, or (at your option)
7 any later version.
8
9 Varnish-mib is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
13
14 You should have received a copy of the GNU General Public License
15 along with varnish-mib. If not, see <http://www.gnu.org/licenses/>.
16*/
17
1%option nounput 18%option nounput
2%option noinput 19%option noinput
3 20
4%{ 21%{
5#include "backend.h" 22#include "backend.h"
6 23
7enum { 24enum {
8 T_BOGUS = 256, 25 T_BOGUS = 256,
9 T_IDENT, 26 T_IDENT,
10 T_NUMBER, 27 T_NUMBER,
11 T_STRING, 28 T_STRING,
12 T_BACKEND, 29 T_BACKEND,
diff --git a/src/modconf.c b/src/modconf.c
index 85b2582..64177c1 100644
--- a/src/modconf.c
+++ b/src/modconf.c
@@ -1,12 +1,29 @@
1/* This file is part of varnish-mib
2 Copyright (C) 2018 Sergey Poznyakoff
3
4 Varnish-mib is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 3, or (at your option)
7 any later version.
8
9 Varnish-mib is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
13
14 You should have received a copy of the GNU General Public License
15 along with varnish-mib. If not, see <http://www.gnu.org/licenses/>.
16*/
17
1#include "varnish_mib.h" 18#include "varnish_mib.h"
2#include <ctype.h> 19#include <ctype.h>
3 20
4static int 21static int
5timeout_parser(const char *token, char *line, unsigned *retval) 22timeout_parser(const char *token, char *line, unsigned *retval)
6{ 23{
7 char *p; 24 char *p;
8 unsigned long n = strtoul(line, &p, 10); 25 unsigned long n = strtoul(line, &p, 10);
9 26
10 if (*p) { 27 if (*p) {
11 if (isspace(*p)) { 28 if (isspace(*p)) {
12 while (*p && isspace(*p)) 29 while (*p && isspace(*p))
diff --git a/src/varnish-mib.8 b/src/varnish-mib.8
index 8d86f18..77912af 100644
--- a/src/varnish-mib.8
+++ b/src/varnish-mib.8
@@ -1,108 +1,136 @@
1.\" This file is part of Varnish-mib -*- nroff -*- 1.\" This file is part of Varnish-mib -*- nroff -*-
2.\" Copyright (C) 2014-2016 Sergey Poznyakoff 2.\" Copyright (C) 2014-2018 Sergey Poznyakoff
3.\" 3.\"
4.\" Varnish-mib is free software; you can redistribute it and/or modify 4.\" Varnish-mib is free software; you can redistribute it and/or modify
5.\" it under the terms of the GNU General Public License as published by 5.\" it under the terms of the GNU General Public License as published by
6.\" the Free Software Foundation; either version 3, or (at your option) 6.\" the Free Software Foundation; either version 3, or (at your option)
7.\" any later version. 7.\" any later version.
8.\" 8.\"
9.\" Varnish-mib is distributed in the hope that it will be useful, 9.\" Varnish-mib is distributed in the hope that it will be useful,
10.\" but WITHOUT ANY WARRANTY; without even the implied warranty of 10.\" but WITHOUT ANY WARRANTY; without even the implied warranty of
11.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12.\" GNU General Public License for more details. 12.\" GNU General Public License for more details.
13.\" 13.\"
14.\" You should have received a copy of the GNU General Public License 14.\" You should have received a copy of the GNU General Public License
15.\" along with Varnish-mib. If not, see <http://www.gnu.org/licenses/>. 15.\" along with Varnish-mib. If not, see <http://www.gnu.org/licenses/>.
16.TH VARNISH-MIB 8 "February 2, 2018" "varnish-mib" 16.TH VARNISH-MIB 8 "February 5, 2018" "varnish-mib"
17.SH NAME 17.SH NAME
18varnish\-mib \- net-snmp module for obtaining Varnish Cache statistics 18varnish\-mib \- Net-SNMP module for Varnish Cache monitoring
19.SH SYNOPSIS 19.SH SYNOPSIS
20In \fBsnmpd.conf\fR(5): 20In \fBsnmpd.conf\fR(5):
21.PP 21.PP
22.B dlmod varnish_mib /usr/lib/snmp/varnish\-mib.so 22.B dlmod varnish_mib /usr/lib/snmp/varnish\-mib.so
23.SH DESCRIPTION 23.SH DESCRIPTION
24Dynamically loadable object module for 24Dynamically loadable object module for
25.B net-snmp 25.B net-snmp
26that provides access to Varnish Cache statistics. The module is 26that provides access to Varnish Cache statistics. The module is
27loaded into 27loaded into
28.BR snmpd (8) 28.BR snmpd (8)
29as shown above (actual path can of course differ, depending on how 29as shown above (actual path can of course differ, depending on how
30the package was configured). The module is written for Varnish 30the package was configured). This version is written for Varnish
31version \fB5.\fIX\fR. 31\fB5.2.0\fR.
32.PP 32.PP
33The module obtains most of the data using Varnish API, and \fBvarnishd\fR 33The values in the OID branches
34administrative interface. You should make sure that \fBsnmpd\fR is 34.BR client ,
35able to access both data sources. 35.BR total ,
36.BR master ,
37.BR session ,
38.BR threads ", and "
39.B objects
40are obtained from Varnish API.
36.PP 41.PP
37The user \fBsnmpd\fR runs as should be able to read contents of the 42The OID branches
38\fB/var/lib/varnish/\fIHOSTNAME\fB/_.vsm_mgt\fR directory and read 43.BR backend ,
39files located in it. It must also have read permission on the varnish 44.BR bans ", and "
40secret file. 45.B vcl
46are obtained using \fBvarnishd\fR administrative interface (similar
47to
48.BR varnishadm (8)).
49.PP
50To retrieve this information, the module must
51have enough permissions to scan the Varnish management directory and
52read files located in it. This directory is normally named
53\fB/var/lib/varnish/\fIHOSTNAME\fB/_.vsm_mgt\fR, where \fIHOSTNAME\fR
54stands for the server's hostname. Unless
55.BR snmpd (8)
56is run as root, special measures should be undertaken in order to
57grant access rights. For example, if the daemon runs as user
58\fBsnmp\fR, running the following two commands after starting
59\fBvarnishd\fR will do the trick:
60
61.EX
62 setfacl -m u:snmp:rx /var/lib/varnish/$(hostname)/_.vsm_mgt
63 setfacl -m u:snmp:r /var/lib/varnish/$(hostname)/_.vsm_mgt/*
64.EE
65.PP
66
41.SH CONFIGURATION OPTIONS 67.SH CONFIGURATION OPTIONS
42Configuration statements specific to 68Configuration statements specific to
43.B varnish\-mib 69.B varnish\-mib
44must appear in the 70must appear in the
45.B snmpd.conf 71.B snmpd.conf
46file below the 72file, after the
47.B dlmod 73.B dlmod
48statement that loads the module. 74statement that loads the module.
49.PP 75.PP
50The following configuration statements are available: 76The following configuration statements are available:
51.TP 77.TP
52\fBvarnishBanTableTimeout\fR \fINUMBER\fR 78\fBvarnishBanTableTimeout\fR \fINUMBER\fR
53To create \fBbanTable\fR (see below), \fBvarnish_mib\fR connects to 79To create \fBbanTable\fR (see below), \fBvarnish_mib\fR connects to
54\fBvarnish\fR administration port and issues the \fBban.list\fR 80\fBvarnish\fR administration port and issues the \fBban.list\fR
55command. To minimize the performance impact, the information obtained 81command. To minimize the performance impact, the information obtained
56is cached for a predefined amount of time (60 seconds by default). 82is cached for a predefined amount of time (60 seconds by default).
57This amount (in seconds) is configured by \fBvarnishBanTableTimeout\fR 83This amount (in seconds) is configured by \fBvarnishBanTableTimeout\fR
58statement. 84statement.
59.TP 85.TP
60\fBvarnishBackendTableTimeout\fR \fINUMBER\fR 86\fBvarnishBackendTableTimeout\fR \fINUMBER\fR
61Update interval for \fBbackendTable\fR. Default is 5 seconds. 87Update interval for \fBbackendTable\fR. Default is 5 seconds.
62.TP 88.TP
63\fBvarnishCLIPortTimeout\fR \fINUMBER\fR 89\fBvarnishCLIPortTimeout\fR \fINUMBER\fR
64Sets timeout for I/O operations with Varnish administrative port. 90Sets timeout for I/O operations with Varnish administrative port.
65Default is 5 seconds. 91Default is 5 seconds.
66.PP 92.PP
67The following two statements are not normally needed, since 93The following two statements are not normally needed, but are
68\fBvarnish-mib\fR obtains this information automatically. 94provided for completeness sake:
69.TP 95.TP
70\fBvarnishCLISocket\fR \fIADDRESS\fR[:\fIPORT\fR] 96\fBvarnishCLISocket\fR \fIADDRESS\fR[:\fIPORT\fR]
71Sets the address of Varnish administrative interface 97Sets the address of Varnish administrative interface
72socket. 98socket.
73.TP 99.TP
74\fBvarnishCLISecretFile\fR \fIFILE\fR 100\fBvarnishCLISecretFile\fR \fIFILE\fR
75Pathname of the Varnish secret file. 101Sets the pathname of the Varnish secret file.
76.SH DEBUGGING 102.SH DEBUGGING
77The module defines the following debugging tokens: 103The module defines the following debugging tokens:
78.TP 104.TP
79.B varnish_mib 105.B varnish_mib
80General debugging information. 106Produces general debugging information.
81.TP 107.TP
82.B varnish_mib:ban 108.B varnish_mib:ban
83Debug ban table loading. 109Outputs verbose report about loading th ban table.
84.TP 110.TP
85.B varnish_mib:vcli 111.B varnish_mib:vcli
86Varnish 112Displays additional information regarding varnish
87.B CLI 113.B CLI
88interaction. 114interaction.
89.TP 115.TP
90.B varnish_mib:vcli:transcript 116.B varnish_mib:vcli:transcript
91Enables full transcript of CLI interaction. 117Enables full transcript of varnish CLI session.
92.TP 118.TP
93.B varnish_mib:backend 119.B varnish_mib:backend
94Debug loading the backend information. 120Outputs verbose information about loading the backend information.
95.SH OIDS 121.SH OIDS
96The following OIDs are defined: 122The following OIDs are defined in the
123.B VARNISH-MIB.txt
124file:
97.SS Branch \(dqclient\(dq 125.SS Branch \(dqclient\(dq
98.TP 126.TP
99.B clientAcceptedConnections 127.B clientAcceptedConnections
100Number of accepted connections. 128Number of accepted connections.
101.TP 129.TP
102.B clientRequestsReceived 130.B clientRequestsReceived
103Number of received HTTP requests. 131Number of received HTTP requests.
104.TP 132.TP
105.B clientCacheHits 133.B clientCacheHits
106Number of cache hits. A cache hit indicates that an object has been 134Number of cache hits. A cache hit indicates that an object has been
107delivered to a client without fetching it from a backend server. 135delivered to a client without fetching it from a backend server.
108.TP 136.TP
@@ -113,27 +141,27 @@ passes the request to the backend and this decision itself has been cached.
113.B clientCacheMisses 141.B clientCacheMisses
114Number of misses. A cache miss indicates the object was fetched from 142Number of misses. A cache miss indicates the object was fetched from
115the backend before delivering it to the client. 143the backend before delivering it to the client.
116.TP 144.TP
117.B clientRequests400 145.B clientRequests400
118Client requests received, subject to 400 errors. 146Client requests received, subject to 400 errors.
119.TP 147.TP
120.B clientBan 148.B clientBan
121A write-only OID. When set, invalidates the cache using the supplied 149A write-only OID. When set, invalidates the cache using the supplied
122value as argument to ban. When read, returns an empty string. E.g., 150value as argument to ban. When read, returns an empty string. E.g.,
123to invalidate caches of all \fBpng\fR images: 151to invalidate caches of all \fBpng\fR images:
124 152
125.EE
126snmpset \fBhostname\fR VARNISH\-MIB::clientBan.0 s 'req.url ~ \(dq\\.png$\(dq'
127.EX 153.EX
154snmpset \fIhostname\fR VARNISH\-MIB::clientBan.0 s 'req.url ~ \(dq\\.png$\(dq'
155.EE
128.SS Branch \(dqbackend\(dq 156.SS Branch \(dqbackend\(dq
129.TP 157.TP
130.B backendConnSuccess 158.B backendConnSuccess
131Number of successful connections to the backend. 159Number of successful connections to the backend.
132.TP 160.TP
133.B backendConnNotAttempted 161.B backendConnNotAttempted
134Number of backend connections not attempted, because of the unhealthy 162Number of backend connections not attempted, because of the unhealthy
135status of the backend. 163status of the backend.
136.TP 164.TP
137.B backendConnToMany 165.B backendConnToMany
138Number of backend connections failed because there were too many 166Number of backend connections failed because there were too many
139connections open. 167connections open.
@@ -249,41 +277,42 @@ Master daemon uptime, in hundredths of a second.
249Number of sessions succesfully accepted. 277Number of sessions succesfully accepted.
250.TP 278.TP
251.B sessQueued 279.B sessQueued
252Number of times session was queued waiting for a thread. 280Number of times session was queued waiting for a thread.
253.TP 281.TP
254.B sessDropped 282.B sessDropped
255Number of sessions dropped because session queue was full. 283Number of sessions dropped because session queue was full.
256.TP 284.TP
257.B sessClosed 285.B sessClosed
258Number of sessions closed. 286Number of sessions closed.
259.TP 287.TP
260.B sessPipeline 288.B sessPipeline
261Session pipeline. This variable is available only in Varnish version \fR4.0\fR. 289This OID was used in Varnish \fR4.1\fR, but disappeared from version
290\fB5.0\fR.
262.TP 291.TP
263.B sessReadAhead 292.B sessReadAhead
264Session read-ahead. 293Session read-ahead.
265.TP 294.TP
266.B sessHerd 295.B sessHerd
267Session herd. 296Session herd.
268.TP 297.TP
269.B sessDrop 298.B sessDrop
270Number of sessions dropped for thread. 299Number of sessions dropped for thread.
271.TP 300.TP
272.B sessFail 301.B sessFail
273Number of session accept failures. 302Number of session accept failures.
274.TP 303.TP
275.B sessPipeOverflow 304.B sessPipeOverflow
276Number of session pipe overflows. This variable is available only in 305This OID was used in Varnish \fR4.1\fR, but disappeared in version
277Varnish version \fR4.0\fR. 306\fB5.0\fR.
278.SS Branch \(dqthreads\(dq 307.SS Branch \(dqthreads\(dq
279.TP 308.TP
280.B threadsPools 309.B threadsPools
281Number of thread pools. 310Number of thread pools.
282.TP 311.TP
283.B threadsTotal 312.B threadsTotal
284Number of thread pools. 313Number of thread pools.
285.TP 314.TP
286.B threadsLimitHits 315.B threadsLimitHits
287Number of times more threads were needed, but limit was reached in a 316Number of times more threads were needed, but limit was reached in a
288thread pool. 317thread pool.
289.TP 318.TP
@@ -358,25 +387,25 @@ Number of references to that ban. This equals to the number of objects
358in the varnish cache affected by that ban. 387in the varnish cache affected by that ban.
359.TP 388.TP
360.B banExpression 389.B banExpression
361VCL expression of the ban. 390VCL expression of the ban.
362.RE 391.RE
363 392
364Notice that for performance reasons, the ban table is cached, so the 393Notice that for performance reasons, the ban table is cached, so the
365total number of rows in the \fBbanTable\fR may diverge from the value 394total number of rows in the \fBbanTable\fR may diverge from the value
366of \fBbansTotal\fR variable. The default update interval is 60 395of \fBbansTotal\fR variable. The default update interval is 60
367seconds. It can be configured in the \fBsnmpd.conf\fR file 396seconds. It can be configured in the \fBsnmpd.conf\fR file
368(see the \fBvarnishBanTableTimeout\fR statement above). 397(see the \fBvarnishBanTableTimeout\fR statement above).
369.SS Branch \(dqagent\(dq 398.SS Branch \(dqagent\(dq
370The \fBagent\fR branch is reserved for OIDs for 399The \fBagent\fR branch is reserved for
371implementation-specific management. It is not used currently. 400implementation-specific management. It is not used currently.
372.SH NOTES 401.SH NOTES
373The following OIDs were used in Varnish 4. They are no longer 402The following OIDs were used in Varnish 4. They are no longer
374available in Varnish 5: 403available in Varnish 5:
375.TP 404.TP
376.B clientRequests411 405.B clientRequests411
377Client requests received, subject to 411 errors. This variable is 406Client requests received, subject to 411 errors. This variable is
378available only in Varnish version \fR4.0\fR. 407available only in Varnish version \fR4.0\fR.
379.TP 408.TP
380.B clientRequests413 409.B clientRequests413
381Client requests received, subject to 413 errors. This variable is 410Client requests received, subject to 413 errors. This variable is
382available only in Varnish version \fR4.0\fR. 411available only in Varnish version \fR4.0\fR.
diff --git a/src/vcli.c b/src/vcli.c
index 7d6c2b9..94f0eef 100644
--- a/src/vcli.c
+++ b/src/vcli.c
@@ -1,14 +1,14 @@
1/* This file is part of varnish-mib -*- c -*- 1/* This file is part of varnish-mib -*- c -*-
2 Copyright (C) 2014-2015 Sergey Poznyakoff 2 Copyright (C) 2014-2018 Sergey Poznyakoff
3 3
4 Varnish-mib is free software; you can redistribute it and/or modify 4 Varnish-mib is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by 5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 3, or (at your option) 6 the Free Software Foundation; either version 3, or (at your option)
7 any later version. 7 any later version.
8 8
9 Varnish-mib is distributed in the hope that it will be useful, 9 Varnish-mib is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of 10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details. 12 GNU General Public License for more details.
13 13
14 You should have received a copy of the GNU General Public License 14 You should have received a copy of the GNU General Public License

Return to:

Send suggestions and report system problems to the System administrator.