contrib
contrib copied to clipboard
varnish4_ not working with varnish 5.2
After upgrading our varnish box to 5.2 the munin plugin varnish4 stopped working. Output of munin-node.log:
2017/09/19-01:25:05 [9833] Error output from varnish4_data_structures:
2017/09/19-01:25:05 [9833] No such aspect
2017/09/19-01:25:05 [9833] Known arguments: suggest, config, autoconf.
2017/09/19-01:25:05 [9833] Run with suggest to get a list of known aspects.
2017/09/19-01:25:05 [9833] Service 'varnish4_data_structures' exited with status 1/0.
2017/09/19-01:25:05 [9833] Error output from varnish4_data_structures:
2017/09/19-01:25:05 [9833] No such aspect
2017/09/19-01:25:05 [9833] Known arguments: suggest, config, autoconf.
2017/09/19-01:25:05 [9833] Run with suggest to get a list of known aspects.
2017/09/19-01:25:05 [9833] Service 'varnish4_data_structures' exited with status 1/0.
See remark in upgrading document from varnish-cache.org: https://varnish-cache.org/docs/5.2/whats-new/upgrading-5.2.html
The above error (No such aspect
) is probably caused by an invalid symlink suffix (see the definition of my %ASPECTS
in the plugin). I guess, this is not related to your varnish upgrade.
You may want to run munin-run NAME
for the different varnish symlinks in your installation. This will help you spot the error.
Regarding the upgrade notes you linked: did you want to refer to something specific?
Thx for the comment.
´munin-run varnish4_uptime´ produces nothing. No error on stdout, no log entry. Same for other symlinks. Links are fine, there was no change. We came from varnish 5.1.3 (munin working) and are now using 5.2. The upgrade notes state in the very first paragraph:
There are extensive changes under the hood with respect to statistics counters, but these should all be transparent at the user-level.
Links are fine, there was no change.
In this case I assume, that the error messages above are not related to the problem that you are experiencing. Take a look at these lines of code in the plugin:
if (!defined($ASPECTS{$graph})) {
usage "No such aspect";
}
Here the "symlink suffix" is checked against the keys of a statically defined dictionary (ASPECTS
).
Thus this error message is very likely not related to a varnish upgrade.
(I just want to avoid hunting unrelated ghosts effects)
Maybe you want to share the output of varnishstat -x
before and after the upgrade with us? This seems to be the sole source of information for the plugin.
Ah, that narrows it down! That is the output of varnishstat -x (varnish 5.1.3) for uptime
...
<stat>
<type>MAIN</type>
<name>uptime</name>
<value>1140690</value>
<flag>c</flag>
<format>d</format>
<description>Child process uptime</description>
</stat>
...
And this is for 5.2:
...
<stat>
<name>MGT.uptime</name>
<value>285410</value>
<flag>c</flag>
<format>d</format>
<description>Management process uptime</description>
</stat>
...
Naming has changed, Munin is looking for
...
'uptime' => {
'title' => 'Varnish uptime',
'vlabel' => 'days',
'scale' => 'no',
'values' => {
'uptime' => {
'type' => 'GAUGE',
'cdef' => 'uptime,86400,/'
}
}
},
...
Wouldn't it be more effective to trigger the values by using?: varnishstat -1 instead of varnishstat -x
Maybe the author of this plugin could tell - but I don't know :)
Pull requests are really highly appreciated. The topics covered by the plugins in this repository a way too broad to be handled by our small group of maintainers on a detailed technical level. We merely review and handle contributions and do a bit of cleanup. Thus: please feel free to improve this plugin!
Maybe it's because of: http://munin-monitoring.org/ticket/1272
varnish5 didn't know the field ident anymore. The ident ist join to the name part so you have to split the name value to get the ident part. I have do it with my little knowledge of perl. Look to the attached file.
There is alreday a fix, see the pull request above your post...
You are pointing out to ? with the reference of "little knowledge"?
mobil versendet Am 9. März 2018 15:21:45 schrieb araneolus [email protected]:
varnish5 didn't know the field ident anymore. The ident ist join to the name part so you have to split the name value to get the ident part. I have do it with my little knowledge of perl. Look to the attached file.
-- You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub: https://github.com/munin-monitoring/contrib/issues/876#issuecomment-371825237
Yes, I see it now :-( RTF Comments :-)
Stale issue message
I don't understand why this was reopened.. There is currently a varnish5_
plugin which was merged in:
https://github.com/munin-monitoring/contrib/blob/master/plugins/varnish/varnish5_