-
Notifications
You must be signed in to change notification settings - Fork 104
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error "varnish_main_bans label:<name:\"action\" value:\"gone\" > gauge:<value:1 > should be a Counter" when scraping metrics for Varnish 3.0 #50
Comments
I see your point, we should fix the bug. But i still see I'm afraid this will break the groupings for existing users, change the metric names and their dasboards stop working for bans after this update. As the grouping does not seem to be broken other than with 3.x, could we just remove the "ban" grouping during runtime when we are dealing with a major version of It's bit hard to nowadays upkeep this as I don't use Varnish anymore for day to day work. Testing these different versions locally is also pain in the ass. My main concern is that we don't break/change the metric names for users with > 3.x varnish, which is the majority here. |
Sorry, I may be missing something, but as I understood it the grouping creates the metrics with the labels like So Varnish 4+ has always had the metrics like |
We've been running with #51 for a while now and all our varnish 4+ instances still have all the On the testing different versions, in the PR I did introduce the I understand about maintaining something you don't use anymore, it's difficult. I really appreciate the work you've done on this module, it's made my work much easier! |
Sorry it took me a while to get to this... don't have very much time nowadays to respond quickly here. You are absolutely right. I just checked my 5.x production varnish and it does not go the groupings as intended. If I understand this correctly now, 3.x used to do the groupings and that was fine. But now that we started applying the new counter type there is a mix of gauge and counter typed ban metrics from varnish. So this breaks now 3.x as it tries to squeeze gauges and counters into a single output metrics (with type labels). I was a bit confused by the whole thing, thanks for clarifying. |
3.0.5
1.5.1
So I really should have checked this when I checked 4.0, but along with the
a
flag, Varnish 3 also supported thei
flag which should be treated as a gauge. Thedefault
case in the flagswitch
does treat it as a gauge already though.Yes, we still have Varnish 3 that needs supporting, sorry ;)
The issue here seems to be in the grouping of the
n_ban*
metrics with anaction
label. In Varnish 3 the metrics that start withn_ban
have a mix of flags.n_ban
andn_ban_gone
arei
flags & should be gauges, but the rest area
types and so should be a counter. (see https://github.com/varnishcache/varnish-cache/blob/3.0/include/vsc_fields.h#L142-L148).In Varnish 4+ each of these is not grouped together and they get stored as separate metric names like this:
But in Varnish 3 it tries to group them:
And the
n_ban_gone
metric isn't there due to theerror.
I think this is because in Varnish 4 the metric name was changed from
n_ban
ton_bans
and so the grouping is no longer matching.The text was updated successfully, but these errors were encountered: