diff options
-rw-r--r-- | Makefile.am | 2 | ||||
-rw-r--r-- | NEWS | 90 | ||||
-rw-r--r-- | README | 34 | ||||
-rw-r--r-- | configure.ac | 12 | ||||
-rw-r--r-- | lib/VarnishMib/HashTable.pm | 16 | ||||
-rw-r--r-- | lib/VarnishMib/MIBTable.pm | 16 | ||||
-rw-r--r-- | src/Makefile.am | 2 | ||||
-rw-r--r-- | src/VARNISH-MIB.txt | 6 | ||||
-rw-r--r-- | src/auth.c | 2 | ||||
-rw-r--r-- | src/backend.h | 3 | ||||
-rw-r--r-- | src/ban.c | 2 | ||||
-rw-r--r-- | src/belex.l | 17 | ||||
-rw-r--r-- | src/modconf.c | 17 | ||||
-rw-r--r-- | src/varnish-mib.8 | 85 | ||||
-rw-r--r-- | src/vcli.c | 2 |
15 files changed, 254 insertions, 52 deletions
diff --git a/Makefile.am b/Makefile.am index 30060d5..cea3646 100644 --- a/Makefile.am +++ b/Makefile.am | |||
@@ -1,5 +1,5 @@ | |||
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 |
@@ -1,9 +1,93 @@ | |||
1 | Varnish-mib NEWS -- history of user-visible changes. 2016-04-27 | 1 | Varnish-mib NEWS -- history of user-visible changes. 2018-02-05 |
2 | Copyright (C) 2014-2016 Sergey Poznyakoff | ||
3 | See the end of file for copying conditions. | 2 | See the end of file for copying conditions. |
4 | 3 | ||
5 | Please send Varnish-mib bug reports to <gray@gnu.org> | 4 | Please send Varnish-mib bug reports to <gray@gnu.org> |
6 | 5 | ||
6 | Version 2.0, 2018-02-05 | ||
7 | |||
8 | This version is written for Varnish 5.2.0. It will definitely not | ||
9 | compile with Varnish 5.2.1 and later. You'll have to use version 3.0 | ||
10 | for that. | ||
11 | |||
12 | Most important changes: | ||
13 | |||
14 | New OIDs: | ||
15 | |||
16 | ** VarnishMIB::objects branch | ||
17 | |||
18 | objectsCount | ||
19 | |||
20 | Approximate number of HTTP objects (headers + body, | ||
21 | if present) in the cache. | ||
22 | [Varnish variable MAIN.n_object] | ||
23 | |||
24 | objectsVampire | ||
25 | Number of unresurrected objects. | ||
26 | [MAIN.n_vampireobject] | ||
27 | |||
28 | objectsCore | ||
29 | Approximate number of object metadata elements in the cache. Each | ||
30 | object needs an objectcore, extra objectcores are for | ||
31 | hit-for-miss, hit-for-pass and busy objects. | ||
32 | [MAIN.n_objectcore] | ||
33 | |||
34 | objectsHead | ||
35 | Approximate number of different hash entries in the cache. | ||
36 | [MAIN.n_objecthead] | ||
37 | |||
38 | objectsExpired | ||
39 | Number of objects that expired from cache because of old age. | ||
40 | [MAIN.n_expired] | ||
41 | |||
42 | objectsLRUNuked | ||
43 | How many objects have been forcefully evicted from | ||
44 | storage to make room for a new object. | ||
45 | [MAIN.n_lru_nuked] | ||
46 | |||
47 | objectsLRUMoved | ||
48 | Number of move operations done on the LRU list. | ||
49 | [MAIN.n_lru_moved] | ||
50 | |||
51 | objectsPurges | ||
52 | Number of purge operations executed. | ||
53 | [MAIN.n_purges] | ||
54 | |||
55 | objectsObjPurged | ||
56 | Number of purged objects. | ||
57 | [MAIN.n_obj_purged] | ||
58 | |||
59 | objectsGzip | ||
60 | Number of gzip operations. | ||
61 | [MAIN.n_gzip] | ||
62 | |||
63 | objectsGunzip | ||
64 | Number of gunzip operations. | ||
65 | [MAIN.n_gunzip] | ||
66 | |||
67 | ** VarnishMIB::vcl branch | ||
68 | |||
69 | vclTotal | ||
70 | Number of loaded VCLs in total. | ||
71 | [MAIN.n_vcl] | ||
72 | |||
73 | vclAvail | ||
74 | Number of VCLs available. | ||
75 | [MAIN.n_vcl_avail] | ||
76 | |||
77 | vclDiscard | ||
78 | Number of discarded VCLs. | ||
79 | [MAIN.n_vcl_discard] | ||
80 | |||
81 | vclFail | ||
82 | Number of VCL failures. | ||
83 | [MAIN.vcl_fail] | ||
84 | |||
85 | * Removed OIDs | ||
86 | |||
87 | Several OIDs have been withdrawn due to changes in the Varnish API. | ||
88 | These are: clientRequests411, clientRequests413, and backendConnUnused. | ||
89 | |||
90 | |||
7 | Version 1.1.90 (Git) | 91 | Version 1.1.90 (Git) |
8 | 92 | ||
9 | * Support for Varnish 4.1 | 93 | * Support for Varnish 4.1 |
@@ -21,7 +105,7 @@ Initial release. | |||
21 | 105 | ||
22 | * Copyright information: | 106 | * Copyright information: |
23 | 107 | ||
24 | Copyright (C) 2014-2016 Sergey Poznyakoff | 108 | Copyright (C) 2014-2018 Sergey Poznyakoff |
25 | 109 | ||
26 | Permission is granted to anyone to make or distribute verbatim copies | 110 | Permission is granted to anyone to make or distribute verbatim copies |
27 | of this document as received, in any medium, provided that the | 111 | of this document as received, in any medium, provided that the |
@@ -1,5 +1,4 @@ | |||
1 | Varnish-mib README | 1 | Varnish-mib README |
2 | Copyright (C) 2014-2015 Sergey Poznyakoff | ||
3 | See the end of file for copying conditions. | 2 | See the end of file for copying conditions. |
4 | 3 | ||
5 | * Introduction | 4 | * Introduction |
@@ -10,17 +9,28 @@ for the documentation, and is provided as a brief reference only. | |||
10 | For a detailed documentation, please see the varnish-mib(8) | 9 | For a detailed documentation, please see the varnish-mib(8) |
11 | manpage. | 10 | manpage. |
12 | 11 | ||
12 | If you are building varnish-mib from Git repository, jump to | ||
13 | the section GIT SOURCES, below. | ||
14 | |||
13 | * Overview | 15 | * Overview |
14 | 16 | ||
15 | Varnish-mib is a dynamically loadable object module for net-snmp | 17 | Varnish-mib is a dynamically loadable object module for net-snmp |
16 | snmpd, that provides access to Varnish Cache statistics. It uses | 18 | snmpd, that provides access to Varnish Cache statistics. It uses |
17 | MIBs from varnishsnmp project (http://varnishsnmp.sourceforge.net). | 19 | MIBs from varnishsnmp project (http://varnishsnmp.sourceforge.net). |
18 | 20 | ||
21 | This and other versions of Varnish-mib is available for download from | ||
22 | <http://download.gnu.org.ua/release/varnish-mib>. The following table | ||
23 | describes the relation between the release number and the version | ||
24 | of Varnish API version it is written for: | ||
25 | |||
26 | 1.0 and up to 2.0 Varnish 4.0 and 4.1 | ||
27 | 2.0 (this release) Varnish 5.2.0 | ||
28 | 3.0 Varnish 5.2.1 | ||
29 | |||
19 | * Installation | 30 | * Installation |
20 | 31 | ||
21 | In order to compile the package you need to have Net-snmp and Varnish | 32 | In order to compile the package you need to have Net-SNMP and Varnish |
22 | installed. Only Varnish 4.x is supported. The installation sequence | 33 | installed. The installation sequence is as usual: |
23 | is as usual: | ||
24 | 34 | ||
25 | ./configure [options] | 35 | ./configure [options] |
26 | make | 36 | make |
@@ -40,6 +50,20 @@ $PREFIX/lib/snmp, where $PREFIX stands for the installation prefix. | |||
40 | Install MIBs (the file VARNISH-MIB.txt in DIR. By default it is | 50 | Install MIBs (the file VARNISH-MIB.txt in DIR. By default it is |
41 | installed in $prefix/share/snmp. | 51 | installed in $prefix/share/snmp. |
42 | 52 | ||
53 | * GIT SOURCES | ||
54 | |||
55 | If you cloned the sources from GIT, you will need the following | ||
56 | additional tools in order to bootstrap the package: | ||
57 | |||
58 | + Perl | ||
59 | + mib2c | ||
60 | + Perl module Inline::C | ||
61 | + Flex | ||
62 | |||
63 | Make sure to check out the branch corresponding to the version of | ||
64 | Varnish you are using. Run ./bootstrap. Then, proceed as discussed | ||
65 | above. | ||
66 | |||
43 | * Bug reporting | 67 | * Bug reporting |
44 | 68 | ||
45 | Send bug reports and suggestions to <gray@gnu.org> | 69 | Send bug reports and suggestions to <gray@gnu.org> |
@@ -47,7 +71,7 @@ Send bug reports and suggestions to <gray@gnu.org> | |||
47 | 71 | ||
48 | * Copyright information: | 72 | * Copyright information: |
49 | 73 | ||
50 | Copyright (C) 2014 Sergey Poznyakoff | 74 | Copyright (C) 2014-2018 Sergey Poznyakoff |
51 | 75 | ||
52 | Permission is granted to anyone to make or distribute verbatim copies | 76 | Permission is granted to anyone to make or distribute verbatim copies |
53 | of this document as received, in any medium, provided that the | 77 | of this document as received, in any medium, provided that the |
diff --git a/configure.ac b/configure.ac index 84544b2..917bab5 100644 --- a/configure.ac +++ b/configure.ac | |||
@@ -15,7 +15,7 @@ | |||
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 | 16 | ||
17 | AC_PREREQ(2.69) | 17 | AC_PREREQ(2.69) |
18 | AC_INIT([varnish-mib], 1.1.90, [gray@gnu.org]) | 18 | AC_INIT([varnish-mib], 2.0, [gray@gnu.org]) |
19 | AC_CONFIG_SRCDIR(src/varnish_mib.mib2c) | 19 | AC_CONFIG_SRCDIR(src/varnish_mib.mib2c) |
20 | AM_CONFIG_HEADER(config.h) | 20 | AM_CONFIG_HEADER(config.h) |
21 | AC_CONFIG_AUX_DIR([build-aux]) | 21 | AC_CONFIG_AUX_DIR([build-aux]) |
@@ -45,17 +45,17 @@ PKG_PROG_PKG_CONFIG | |||
45 | # Checks for Varnish | 45 | # Checks for Varnish |
46 | PKG_CHECK_MODULES([VARNISHAPI], [varnishapi >= 5.0]) | 46 | PKG_CHECK_MODULES([VARNISHAPI], [varnishapi >= 5.0]) |
47 | 47 | ||
48 | varnishapi_version() { | 48 | check_minor_number() { |
49 | AC_DEFINE_UNQUOTED([VARNISHAPI_MAJOR],[$1],[Varnish API major version number]) | 49 | if [ "$2" -gt 1 ]; then |
50 | AC_DEFINE_UNQUOTED([VARNISHAPI_MINOR],[$2],[Varnish API minor version number]) | 50 | AC_MSG_ERROR([Unsupported Varnish API version; please try varnish_mib 3.0 or newer]) |
51 | AC_DEFINE_UNQUOTED([VARNISHAPI_PATCH],[$3],[Varnish API patchlevel]) | 51 | fi |
52 | } | 52 | } |