#959812 munin-plugins-core: varnish_ plugin no output (X not part of varnishstat)

#959812#5
Date:
2020-05-05 16:41:02 UTC
From:
To:

#959812#10
Date:
2020-05-05 17:06:17 UTC
From:
To:
This bug applies to all "aspects" of the munnin "varnish_" plugin. None of them produce any data in their graphs OOTB on Debian 10.

fwiw, `varnishstat` clearly *does* have output for 'uptime':

```
root@disp7450:~# varnishstat -x | grep -iC4 uptime
<?xml version="1.0"?>
<varnishstat timestamp="2020-05-05T22:49:15">
	<stat>
		<name>MGT.uptime</name>
		<value>4961</value>
		<flag>c</flag>
		<format>d</format>
		<description>Management process uptime</description>
	</stat>
	<stat>
		<name>MGT.child_start</name>
		<value>1</value>
--
		<format>i</format>
		<description>stat summ operations</description>
	</stat>
	<stat>
		<name>MAIN.uptime</name>
		<value>4961</value>
		<flag>c</flag>
		<format>d</format>
		<description>Child process uptime</description>
	</stat>
	<stat>
		<name>MAIN.sess_conn</name>
		<value>0</value>
root@disp7450:~#
```

Could this be an issue with varnish changing from v5 to v6 from Debian 9 to Debian 10?

 * https://packages.debian.org/source/stretch/varnish
 * https://packages.debian.org/source/buster/varnish

#959812#15
Date:
2020-05-05 17:32:26 UTC
From:
To:
I just confirmed that this issue also exists for Debian 9:

```
user@disp5874:~$ sudo su -
root@disp5874:~# cat /etc/issue
Debian GNU/Linux 9 \n \l
root@disp5874:~# apt-get install varnish munin
...
root@disp5874:~# echo -e '\n[varnish*]\nuser root\n' > /etc/munin/plugin-conf.d/z-varnish
root@disp5874:~# munin-run --debug --pidebug  varnish_uptime
# Processing plugin configuration from /etc/munin/plugin-conf.d/munin-node
# Processing plugin configuration from /etc/munin/plugin-conf.d/z-varnish
# Setting /rgid/ruid/ to /123/0/
# Setting /egid/euid/ to /123 123/0/
# Setting up environment
# About to run '/etc/munin/plugins/varnish_uptime'
root@disp5874:~# vim /usr/share/munin/plugins/varnish_
root@disp5874:~# munin-run --debug --pidebug  varnish_uptime
# Processing plugin configuration from /etc/munin/plugin-conf.d/munin-node
# Processing plugin configuration from /etc/munin/plugin-conf.d/z-varnish
# Setting /rgid/ruid/ to /123/0/
# Setting /egid/euid/ to /123 123/0/
# Setting up environment
# About to run '/etc/munin/plugins/varnish_uptime'
Error: uptime not part of varnishstat.
root@disp5874:~# ~
```

And here's the rest of the objects. Note that varnish_memory_usage actually does get some of its values; most don't.

```
root@disp5874:~# munin-run --debug --pidebug  varnish_objects
# Processing plugin configuration from /etc/munin/plugin-conf.d/munin-node
# Processing plugin configuration from /etc/munin/plugin-conf.d/z-varnish
# Setting /rgid/ruid/ to /123/0/
# Setting /egid/euid/ to /123 123/0/
# Setting up environment
# About to run '/etc/munin/plugins/varnish_objects'
Error: n_objecthead not part of varnishstat.
Error: n_objcore not part of varnishstat.
Error: n_object not part of varnishstat.
root@disp5874:~# munin-run --debug --pidebug  varnish_backend_traffic
# Processing plugin configuration from /etc/munin/plugin-conf.d/munin-node
# Processing plugin configuration from /etc/munin/plugin-conf.d/z-varnish
# Setting /rgid/ruid/ to /123/0/
# Setting /egid/euid/ to /123 123/0/
# Setting up environment
# About to run '/etc/munin/plugins/varnish_backend_traffic'
Error: backend_conn not part of varnishstat.
Error: backend_reuse not part of varnishstat.
Error: backend_fail not part of varnishstat.
Error: backend_recycle not part of varnishstat.
Error: backend_req not part of varnishstat.
Error: backend_unused not part of varnishstat.
Error: backend_unhealthy not part of varnishstat.
Error: backend_busy not part of varnishstat.
root@disp5874:~# munin-run --debug --pidebug  varnish_bad
# Processing plugin configuration from /etc/munin/plugin-conf.d/munin-node
# Processing plugin configuration from /etc/munin/plugin-conf.d/z-varnish
# Setting /rgid/ruid/ to /123/0/
# Setting /egid/euid/ to /123 123/0/
# Setting up environment
# About to run '/etc/munin/plugins/varnish_bad'
Error: n_objoverflow not part of varnishstat.
SMA_s0_c_fail.value 0
SMA_Transient_c_fail.value 0
Error: n_wrk_failed not part of varnishstat.
Error: n_wrk_lqueue not part of varnishstat.
Error: client_drop not part of varnishstat.
Error: client_drop_late not part of varnishstat.
Error: backend_unhealthy not part of varnishstat.
Error: accept_fail not part of varnishstat.
Error: fetch_failed not part of varnishstat.
Error: n_wrk_drop not part of varnishstat.
Error: n_wrk_max not part of varnishstat.
Error: backend_busy not part of varnishstat.
Error: esi_warnings not part of varnishstat.
Error: losthdr not part of varnishstat.
Error: esi_errors not part of varnishstat.
root@disp5874:~# munin-run --debug --pidebug  varnish_expunge
# Processing plugin configuration from /etc/munin/plugin-conf.d/munin-node
# Processing plugin configuration from /etc/munin/plugin-conf.d/z-varnish
# Setting /rgid/ruid/ to /123/0/
# Setting /egid/euid/ to /123 123/0/
# Setting up environment
# About to run '/etc/munin/plugins/varnish_expunge'
Error: n_expired not part of varnishstat.
Error: n_lru_nuked not part of varnishstat.
root@disp5874:~# munin-run --debug --pidebug  varnish_hit_rate
# Processing plugin configuration from /etc/munin/plugin-conf.d/munin-node
# Processing plugin configuration from /etc/munin/plugin-conf.d/z-varnish
# Setting /rgid/ruid/ to /123/0/
# Setting /egid/euid/ to /123 123/0/
# Setting up environment
# About to run '/etc/munin/plugins/varnish_hit_rate'
Error: client_req not part of varnishstat.
Error: cache_hit not part of varnishstat.
Error: cache_miss not part of varnishstat.
Error: cache_hitpass not part of varnishstat.
root@disp5874:~# munin-run --debug --pidebug  varnish_memory_usage
# Processing plugin configuration from /etc/munin/plugin-conf.d/munin-node
# Processing plugin configuration from /etc/munin/plugin-conf.d/z-varnish
# Setting /rgid/ruid/ to /123/0/
# Setting /egid/euid/ to /123 123/0/
# Setting up environment
# About to run '/etc/munin/plugins/varnish_memory_usage'
Error: sma_nbytes not part of varnishstat.
Error: sms_nbytes not part of varnishstat.
SMA_Transient_g_bytes.value 0
SMA_s0_g_bytes.value 0
Error: sm_balloc not part of varnishstat.
SMA_Transient_g_space.value 0
SMA_s0_g_space.value 268435456
root@disp5874:~# munin-run --debug --pidebug  varnish_objects
# Processing plugin configuration from /etc/munin/plugin-conf.d/munin-node
# Processing plugin configuration from /etc/munin/plugin-conf.d/z-varnish
# Setting /rgid/ruid/ to /123/0/
# Setting /egid/euid/ to /123 123/0/
# Setting up environment
# About to run '/etc/munin/plugins/varnish_objects'
Error: n_objecthead not part of varnishstat.
Error: n_object not part of varnishstat.
Error: n_objcore not part of varnishstat.
root@disp5874:~# munin-run --debug --pidebug  varnish_request_rate
# Processing plugin configuration from /etc/munin/plugin-conf.d/munin-node
# Processing plugin configuration from /etc/munin/plugin-conf.d/z-varnish
# Setting /rgid/ruid/ to /123/0/
# Setting /egid/euid/ to /123 123/0/
# Setting up environment
# About to run '/etc/munin/plugins/varnish_request_rate'
Error: client_req not part of varnishstat.
Error: backend_conn not part of varnishstat.
Error: cache_hit not part of varnishstat.
Error: client_conn not part of varnishstat.
Error: cache_hitpass not part of varnishstat.
Error: cache_miss not part of varnishstat.
Error: s_pipe not part of varnishstat.
Error: backend_unhealthy not part of varnishstat.
Error: s_pass not part of varnishstat.
root@disp5874:~# munin-run --debug --pidebug  varnish_threads
# Processing plugin configuration from /etc/munin/plugin-conf.d/munin-node
# Processing plugin configuration from /etc/munin/plugin-conf.d/z-varnish
# Setting /rgid/ruid/ to /123/0/
# Setting /egid/euid/ to /123 123/0/
# Setting up environment
# About to run '/etc/munin/plugins/varnish_threads'
Error: n_wrk_max not part of varnishstat.
Error: n_wrk_drop not part of varnishstat.
Error: n_wrk_failed not part of varnishstat.
Error: n_wrk_overflow not part of varnishstat.
Error: n_wrk_create not part of varnishstat.
Error: n_wrk not part of varnishstat.
root@disp5874:~# munin-run --debug --pidebug  varnish_transfer_rates
# Processing plugin configuration from /etc/munin/plugin-conf.d/munin-node
# Processing plugin configuration from /etc/munin/plugin-conf.d/z-varnish
# Setting /rgid/ruid/ to /123/0/
# Setting /egid/euid/ to /123 123/0/
# Setting up environment
# About to run '/etc/munin/plugins/varnish_transfer_rates'
Error: s_hdrbytes not part of varnishstat.
Error: s_bodybytes not part of varnishstat.
root@disp5874:~# munin-run --debug --pidebug  varnish_uptime
# Processing plugin configuration from /etc/munin/plugin-conf.d/munin-node
# Processing plugin configuration from /etc/munin/plugin-conf.d/z-varnish
# Setting /rgid/ruid/ to /123/0/
# Setting /egid/euid/ to /123 123/0/
# Setting up environment
# About to run '/etc/munin/plugins/varnish_uptime'
Error: uptime not part of varnishstat.
root@disp5874:~#
```

And a subset of `varnihsstat -x`

```
root@disp5874:~# varnishstat -x | grep -EiC4 'uptime|SMA'
<?xml version="1.0"?>
<varnishstat timestamp="2020-05-05T23:16:33">
	<stat>
		<type>MAIN</type>
		<name>uptime</name>
		<value>1194</value>
		<flag>c</flag>
		<format>d</format>
		<description>Child process uptime</description>
	</stat>
	<stat>
		<type>MAIN</type>
		<name>sess_conn</name>
--
		<description>Overflowed VSM space</description>
	</stat>
	<stat>
		<type>MGT</type>
		<name>uptime</name>
		<value>1194</value>
		<flag>c</flag>
		<format>d</format>
		<description>Management process uptime</description>
	</stat>
	<stat>
		<type>MGT</type>
		<name>child_start</name>
--
	</stat>
	<stat>
		<type>MEMPOOL</type>
		<ident>busyobj</ident>
		<name>toosmall</name>
		<value>0</value>
		<flag>c</flag>
		<format>i</format>
		<description>Too small to recycle</description>
	</stat>
	<stat>
		<type>MEMPOOL</type>
		<ident>busyobj</ident>
--
	</stat>
	<stat>
		<type>MEMPOOL</type>
		<ident>req0</ident>
		<name>toosmall</name>
		<value>0</value>
		<flag>c</flag>
		<format>i</format>
		<description>Too small to recycle</description>
	</stat>
	<stat>
		<type>MEMPOOL</type>
		<ident>req0</ident>
--
	</stat>
	<stat>
		<type>MEMPOOL</type>
		<ident>sess0</ident>
		<name>toosmall</name>
		<value>0</value>
		<flag>c</flag>
		<format>i</format>
		<description>Too small to recycle</description>
	</stat>
	<stat>
		<type>MEMPOOL</type>
		<ident>sess0</ident>
--
	</stat>
	<stat>
		<type>MEMPOOL</type>
		<ident>req1</ident>
		<name>toosmall</name>
		<value>0</value>
		<flag>c</flag>
		<format>i</format>
		<description>Too small to recycle</description>
	</stat>
	<stat>
		<type>MEMPOOL</type>
		<ident>req1</ident>
--
	</stat>
	<stat>
		<type>MEMPOOL</type>
		<ident>sess1</ident>
		<name>toosmall</name>
		<value>0</value>
		<flag>c</flag>
		<format>i</format>
		<description>Too small to recycle</description>
	</stat>
	<stat>
		<type>MEMPOOL</type>
		<ident>sess1</ident>
--
		<format>i</format>
		<description>Pool ran dry</description>
	</stat>
	<stat>
		<type>SMA</type>
		<ident>s0</ident>
		<name>c_req</name>
		<value>0</value>
		<flag>c</flag>
		<format>i</format>
		<description>Allocator requests</description>
	</stat>
	<stat>
		<type>SMA</type>
		<ident>s0</ident>
		<name>c_fail</name>
		<value>0</value>
		<flag>c</flag>
		<format>i</format>
		<description>Allocator failures</description>
	</stat>
	<stat>
		<type>SMA</type>
		<ident>s0</ident>
		<name>c_bytes</name>
		<value>0</value>
		<flag>c</flag>
		<format>B</format>
		<description>Bytes allocated</description>
	</stat>
	<stat>
		<type>SMA</type>
		<ident>s0</ident>
		<name>c_freed</name>
		<value>0</value>
		<flag>c</flag>
		<format>B</format>
		<description>Bytes freed</description>
	</stat>
	<stat>
		<type>SMA</type>
		<ident>s0</ident>
		<name>g_alloc</name>
		<value>0</value>
		<flag>g</flag>
		<format>i</format>
		<description>Allocations outstanding</description>
	</stat>
	<stat>
		<type>SMA</type>
		<ident>s0</ident>
		<name>g_bytes</name>
		<value>0</value>
		<flag>g</flag>
		<format>B</format>
		<description>Bytes outstanding</description>
	</stat>
	<stat>
		<type>SMA</type>
		<ident>s0</ident>
		<name>g_space</name>
		<value>268435456</value>
		<flag>g</flag>
		<format>B</format>
		<description>Bytes available</description>
	</stat>
	<stat>
		<type>SMA</type>
		<ident>Transient</ident>
		<name>c_req</name>
		<value>0</value>
		<flag>c</flag>
		<format>i</format>
		<description>Allocator requests</description>
	</stat>
	<stat>
		<type>SMA</type>
		<ident>Transient</ident>
		<name>c_fail</name>
		<value>0</value>
		<flag>c</flag>
		<format>i</format>
		<description>Allocator failures</description>
	</stat>
	<stat>
		<type>SMA</type>
		<ident>Transient</ident>
		<name>c_bytes</name>
		<value>0</value>
		<flag>c</flag>
		<format>B</format>
		<description>Bytes allocated</description>
	</stat>
	<stat>
		<type>SMA</type>
		<ident>Transient</ident>
		<name>c_freed</name>
		<value>0</value>
		<flag>c</flag>
		<format>B</format>
		<description>Bytes freed</description>
	</stat>
	<stat>
		<type>SMA</type>
		<ident>Transient</ident>
		<name>g_alloc</name>
		<value>0</value>
		<flag>g</flag>
		<format>i</format>
		<description>Allocations outstanding</description>
	</stat>
	<stat>
		<type>SMA</type>
		<ident>Transient</ident>
		<name>g_bytes</name>
		<value>0</value>
		<flag>g</flag>
		<format>B</format>
		<description>Bytes outstanding</description>
	</stat>
	<stat>
		<type>SMA</type>
		<ident>Transient</ident>
		<name>g_space</name>
		<value>0</value>
		<flag>g</flag>
--
		<description>Lock Operations</description>
	</stat>
	<stat>
		<type>LCK</type>
		<ident>sma</ident>
		<name>creat</name>
		<value>2</value>
		<flag>c</flag>
		<format>i</format>
		<description>Created locks</description>
	</stat>
	<stat>
		<type>LCK</type>
		<ident>sma</ident>
		<name>destroy</name>
		<value>0</value>
		<flag>c</flag>
		<format>i</format>
		<description>Destroyed locks</description>
	</stat>
	<stat>
		<type>LCK</type>
		<ident>sma</ident>
		<name>locks</name>
		<value>0</value>
		<flag>c</flag>
		<format>i</format>
root@disp5874:~#
```

#959812#20
Date:
2021-04-27 16:04:54 UTC
From:
To:
Yes, the varnish_ plugin in the Debian munin package is totally useless
because it targets Varnish 3.
Debian uses Varnish 6, hence the varnish5_ plugin from munin-monitoring
is needed:
https://github.com/munin-monitoring/contrib/tree/master/plugins/varnish