Skip to content

Commit

Permalink
Merge pull request collectd#3445 from F4-Group/varnish6-support
Browse files Browse the repository at this point in the history
Add varnish 6 support
  • Loading branch information
octo authored Apr 27, 2020
2 parents af3e316 + bdd7935 commit ce8a982
Show file tree
Hide file tree
Showing 4 changed files with 179 additions and 68 deletions.
37 changes: 21 additions & 16 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -6084,24 +6084,29 @@ if test "x$with_libvarnish" = "xyes"; then
SAVE_CPPFLAGS="$CPPFLAGS"
CPPFLAGS="$CPPFLAGS $with_libvarnish_cflags"
$PKG_CONFIG --atleast-version=5.2 'varnishapi' 2>/dev/null
$PKG_CONFIG --atleast-version=6 'varnishapi' 2>/dev/null
if test $? -eq 0; then
AC_DEFINE([HAVE_VARNISH_V5], [1], [Varnish 5 API support])
AC_DEFINE([HAVE_VARNISH_V6], [1], [Varnish 6 API support])
else
AC_CHECK_HEADERS([vapi/vsc.h],
[AC_DEFINE([HAVE_VARNISH_V4], [1], [Varnish 4 API support])],
[
AC_CHECK_HEADERS([vsc.h],
[AC_DEFINE([HAVE_VARNISH_V3], [1], [Varnish 3 API support]) ],
[
AC_CHECK_HEADERS([varnishapi.h],
[AC_DEFINE([HAVE_VARNISH_V2], [1], [Varnish 2 API support])],
[with_libvarnish="no (found none of the varnish header files)"]
)
]
)
]
)
$PKG_CONFIG --atleast-version=5.2 'varnishapi' 2>/dev/null
if test $? -eq 0; then
AC_DEFINE([HAVE_VARNISH_V5], [1], [Varnish 5 API support])
else
AC_CHECK_HEADERS([vapi/vsc.h],
[AC_DEFINE([HAVE_VARNISH_V4], [1], [Varnish 4 API support])],
[
AC_CHECK_HEADERS([vsc.h],
[AC_DEFINE([HAVE_VARNISH_V3], [1], [Varnish 3 API support]) ],
[
AC_CHECK_HEADERS([varnishapi.h],
[AC_DEFINE([HAVE_VARNISH_V2], [1], [Varnish 2 API support])],
[with_libvarnish="no (found none of the varnish header files)"]
)
]
)
]
)
fi
fi
CPPFLAGS="$SAVE_CPPFLAGS"
Expand Down
15 changes: 8 additions & 7 deletions src/collectd.conf.in
Original file line number Diff line number Diff line change
Expand Up @@ -1827,7 +1827,7 @@
# CollectPurge false # Varnish 2 only
# CollectSession false
# CollectSHM true
# CollectSMA false # Varnish 2 & 4 only
# CollectSMA false # Varnish 2 & Varnish 4 and above
# CollectSMS false
# CollectSM false # Varnish 2 only
# CollectStruct false
Expand All @@ -1836,12 +1836,13 @@
# CollectVCL false
# CollectVSM false # Varnish 4 only
# CollectWorkers false
# CollectLock false # Varnish 4 only
# CollectMempool false # Varnish 4 only
# CollectManagement false # Varnish 4 only
# CollectSMF false # Varnish 4 only
# CollectVBE false # Varnish 4 only
# CollectMSE false # Varnish-Plus 4 only
# CollectLock false # Varnish 4 and above
# CollectMempool false # Varnish 4 and above
# CollectManagement false # Varnish 4 and above
# CollectSMF false # Varnish 4 and above
# CollectVBE false # Varnish 4 and above
# CollectMSE false # Varnish-Plus only
# CollectGOTO false # Varnish-Plus 6 only
# </Instance>
#</Plugin>

Expand Down
23 changes: 14 additions & 9 deletions src/collectd.conf.pod
Original file line number Diff line number Diff line change
Expand Up @@ -10015,7 +10015,8 @@ log messages which is flushed to disk when full. True by default.

malloc or umem (umem_alloc(3MALLOC) based) storage statistics. The umem storage
component is Solaris specific. Note: SMA, SMF and MSE share counters, enable
only the one used by the Varnish instance. Only available with Varnish 2.x.
only the one used by the Varnish instance. Available with Varnish 2.x,
varnish 4.x and above (Not available in varnish 3.x).
False by default.

=item B<CollectSMS> B<true>|B<false>
Expand All @@ -10025,8 +10026,8 @@ component is used internally only. False by default.

=item B<CollectSM> B<true>|B<false>

file (memory mapped file) storage statistics. Only available with Varnish 2.x.,
in varnish 4.x. use CollectSMF.
file (memory mapped file) storage statistics. Only available with Varnish 2.x,
in varnish 4.x and above use CollectSMF.
False by default.

=item B<CollectStruct> B<true>|B<false>
Expand Down Expand Up @@ -10059,33 +10060,37 @@ Collect statistics about worker threads. False by default.

=item B<CollectVBE> B<true>|B<false>

Backend counters. Only available with Varnish 4.x. False by default.
Backend counters. Only available with Varnish 4.x and above. False by default.

=item B<CollectSMF> B<true>|B<false>

file (memory mapped file) storage statistics. Only available with Varnish 4.x.
file (memory mapped file) storage statistics. Only available with Varnish 4.x and above.
Note: SMA, SMF and MSE share counters, enable only the one used by the Varnish
instance. Used to be called SM in Varnish 2.x. False by default.

=item B<CollectManagement> B<true>|B<false>

Management process counters. Only available with Varnish 4.x. False by default.
Management process counters. Only available with Varnish 4.x and above. False by default.

=item B<CollectLock> B<true>|B<false>

Lock counters. Only available with Varnish 4.x. False by default.
Lock counters. Only available with Varnish 4.x and above. False by default.

=item B<CollectMempool> B<true>|B<false>

Memory pool counters. Only available with Varnish 4.x. False by default.
Memory pool counters. Only available with Varnish 4.x and above. False by default.

=item B<CollectMSE> B<true>|B<false>

Varnish Massive Storage Engine 2.0 (MSE2) is an improved storage backend for
Varnish, replacing the traditional malloc and file storages. Only available
with Varnish-Plus 4.x. Note: SMA, SMF and MSE share counters, enable only the
with Varnish-Plus 4.x and above. Note: SMA, SMF and MSE share counters, enable only the
one used by the Varnish instance. False by default.

=item B<CollectGOTO> B<true>|B<false>

vmod-goto counters. Only available with Varnish Plus 6.x. False by default.

=back

=head2 Plugin C<virt>
Expand Down
Loading

0 comments on commit ce8a982

Please sign in to comment.