diff options
Diffstat (limited to 'src/varnish-mib.8')
-rw-r--r-- | src/varnish-mib.8 | 85 |
1 files changed, 57 insertions, 28 deletions
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,5 +1,5 @@ | |||
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 |
@@ -13,9 +13,9 @@ | |||
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 |
18 | varnish\-mib \- net-snmp module for obtaining Varnish Cache statistics | 18 | varnish\-mib \- Net-SNMP module for Varnish Cache monitoring |
19 | .SH SYNOPSIS | 19 | .SH SYNOPSIS |
20 | In \fBsnmpd.conf\fR(5): | 20 | In \fBsnmpd.conf\fR(5): |
21 | .PP | 21 | .PP |
@@ -27,23 +27,49 @@ that provides access to Varnish Cache statistics. The module is | |||
27 | loaded into | 27 | loaded into |
28 | .BR snmpd (8) | 28 | .BR snmpd (8) |
29 | as shown above (actual path can of course differ, depending on how | 29 | as shown above (actual path can of course differ, depending on how |
30 | the package was configured). The module is written for Varnish | 30 | the package was configured). This version is written for Varnish |
31 | version \fB5.\fIX\fR. | 31 | \fB5.2.0\fR. |
32 | .PP | 32 | .PP |
33 | The module obtains most of the data using Varnish API, and \fBvarnishd\fR | 33 | The values in the OID branches |
34 | administrative interface. You should make sure that \fBsnmpd\fR is | 34 | .BR client , |
35 | able to access both data sources. | 35 | .BR total , |
36 | .BR master , | ||
37 | .BR session , | ||
38 | .BR threads ", and " | ||
39 | .B objects | ||
40 | are obtained from Varnish API. | ||
36 | .PP | 41 | .PP |
37 | The user \fBsnmpd\fR runs as should be able to read contents of the | 42 | The OID branches |
38 | \fB/var/lib/varnish/\fIHOSTNAME\fB/_.vsm_mgt\fR directory and read | 43 | .BR backend , |
39 | files located in it. It must also have read permission on the varnish | 44 | .BR bans ", and " |
40 | secret file. | 45 | .B vcl |
46 | are obtained using \fBvarnishd\fR administrative interface (similar | ||
47 | to | ||
48 | .BR varnishadm (8)). | ||
49 | .PP | ||
50 | To retrieve this information, the module must | ||
51 | have enough permissions to scan the Varnish management directory and | ||
52 | read files located in it. This directory is normally named | ||
53 | \fB/var/lib/varnish/\fIHOSTNAME\fB/_.vsm_mgt\fR, where \fIHOSTNAME\fR | ||
54 | stands for the server's hostname. Unless | ||
55 | .BR snmpd (8) | ||
56 | is run as root, special measures should be undertaken in order to | ||
57 | grant 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 |
42 | Configuration statements specific to | 68 | Configuration statements specific to |
43 | .B varnish\-mib | 69 | .B varnish\-mib |
44 | must appear in the | 70 | must appear in the |
45 | .B snmpd.conf | 71 | .B snmpd.conf |
46 | file below the | 72 | file, after the |
47 | .B dlmod | 73 | .B dlmod |
48 | statement that loads the module. | 74 | statement that loads the module. |
49 | .PP | 75 | .PP |
@@ -64,36 +90,38 @@ Update interval for \fBbackendTable\fR. Default is 5 seconds. | |||
64 | Sets timeout for I/O operations with Varnish administrative port. | 90 | Sets timeout for I/O operations with Varnish administrative port. |
65 | Default is 5 seconds. | 91 | Default is 5 seconds. |
66 | .PP | 92 | .PP |
67 | The following two statements are not normally needed, since | 93 | The following two statements are not normally needed, but are |
68 | \fBvarnish-mib\fR obtains this information automatically. | 94 | provided for completeness sake: |
69 | .TP | 95 | .TP |
70 | \fBvarnishCLISocket\fR \fIADDRESS\fR[:\fIPORT\fR] | 96 | \fBvarnishCLISocket\fR \fIADDRESS\fR[:\fIPORT\fR] |
71 | Sets the address of Varnish administrative interface | 97 | Sets the address of Varnish administrative interface |
72 | socket. | 98 | socket. |
73 | .TP | 99 | .TP |
74 | \fBvarnishCLISecretFile\fR \fIFILE\fR | 100 | \fBvarnishCLISecretFile\fR \fIFILE\fR |
75 | Pathname of the Varnish secret file. | 101 | Sets the pathname of the Varnish secret file. |
76 | .SH DEBUGGING | 102 | .SH DEBUGGING |
77 | The module defines the following debugging tokens: | 103 | The module defines the following debugging tokens: |
78 | .TP | 104 | .TP |
79 | .B varnish_mib | 105 | .B varnish_mib |
80 | General debugging information. | 106 | Produces general debugging information. |
81 | .TP | 107 | .TP |
82 | .B varnish_mib:ban | 108 | .B varnish_mib:ban |
83 | Debug ban table loading. | 109 | Outputs verbose report about loading th ban table. |
84 | .TP | 110 | .TP |
85 | .B varnish_mib:vcli | 111 | .B varnish_mib:vcli |
86 | Varnish | 112 | Displays additional information regarding varnish |
87 | .B CLI | 113 | .B CLI |
88 | interaction. | 114 | interaction. |
89 | .TP | 115 | .TP |
90 | .B varnish_mib:vcli:transcript | 116 | .B varnish_mib:vcli:transcript |
91 | Enables full transcript of CLI interaction. | 117 | Enables full transcript of varnish CLI session. |
92 | .TP | 118 | .TP |
93 | .B varnish_mib:backend | 119 | .B varnish_mib:backend |
94 | Debug loading the backend information. | 120 | Outputs verbose information about loading the backend information. |
95 | .SH OIDS | 121 | .SH OIDS |
96 | The following OIDs are defined: | 122 | The following OIDs are defined in the |
123 | .B VARNISH-MIB.txt | ||
124 | file: | ||
97 | .SS Branch \(dqclient\(dq | 125 | .SS Branch \(dqclient\(dq |
98 | .TP | 126 | .TP |
99 | .B clientAcceptedConnections | 127 | .B clientAcceptedConnections |
@@ -122,9 +150,9 @@ A write-only OID. When set, invalidates the cache using the supplied | |||
122 | value as argument to ban. When read, returns an empty string. E.g., | 150 | value as argument to ban. When read, returns an empty string. E.g., |
123 | to invalidate caches of all \fBpng\fR images: | 151 | to invalidate caches of all \fBpng\fR images: |
124 | 152 | ||
125 | .EE | ||
126 | snmpset \fBhostname\fR VARNISH\-MIB::clientBan.0 s 'req.url ~ \(dq\\.png$\(dq' | ||
127 | .EX | 153 | .EX |
154 | snmpset \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 |
@@ -258,7 +286,8 @@ Number of sessions dropped because session queue was full. | |||
258 | Number of sessions closed. | 286 | Number of sessions closed. |
259 | .TP | 287 | .TP |
260 | .B sessPipeline | 288 | .B sessPipeline |
261 | Session pipeline. This variable is available only in Varnish version \fR4.0\fR. | 289 | This 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 |
264 | Session read-ahead. | 293 | Session read-ahead. |
@@ -273,8 +302,8 @@ Number of sessions dropped for thread. | |||
273 | Number of session accept failures. | 302 | Number of session accept failures. |
274 | .TP | 303 | .TP |
275 | .B sessPipeOverflow | 304 | .B sessPipeOverflow |
276 | Number of session pipe overflows. This variable is available only in | 305 | This OID was used in Varnish \fR4.1\fR, but disappeared in version |
277 | Varnish 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 |
@@ -367,7 +396,7 @@ of \fBbansTotal\fR variable. The default update interval is 60 | |||
367 | seconds. It can be configured in the \fBsnmpd.conf\fR file | 396 | seconds. 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 |
370 | The \fBagent\fR branch is reserved for OIDs for | 399 | The \fBagent\fR branch is reserved for |
371 | implementation-specific management. It is not used currently. | 400 | implementation-specific management. It is not used currently. |
372 | .SH NOTES | 401 | .SH NOTES |
373 | The following OIDs were used in Varnish 4. They are no longer | 402 | The following OIDs were used in Varnish 4. They are no longer |