-
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 "gauge should be a Counter" when scraping metrics for varnish 4.0 #47
Comments
Thanks for the great repro gist. That was very useful as its hard to keep multiple versions of varnish running for normal dev. I group session metrics starting with 4.0 varnishstat exports this
6.0.1 varnishstat exports this
The idea is that those are then grouped into a single metric name with the type counter.
I think the bug is that in 4.0 specifically some of those In the full 4.0 prom metrics you can see the flag The semi hack fix is to check the first metrics "parent" created (in this case In the meanwhile have you downgraded the exporter or upgraded varnish so you have a working setup? :) |
This is the new code in latest version that breaks this https://github.com/jonnenauha/prometheus_varnish_exporter/blob/master/varnish.go#L141-L149 It does not handle the Looking at the full 6.x dump, it does not have any |
Thanks, yes we can downgrade the exporter. Unfortunately upgrading Varnish isn't an option at this time, we have a number of legacy instances. Working on getting them updated, but not there yet. Looks like handling the |
According to the varnish 4.0 code https://github.com/varnishcache/varnish-cache/blob/4.0/include/tbl/vsc_f_main.h#L36 it's I've pushed a PR that looks like it fixes this issue, I've tested the compiled binary against my test above. #48 |
4.0.5
1.5
prometheus_varnish_exporter
runs and reports aSuccessful scrape
, however, if you curl the/metrics
endpoint this is returned:Only happens on Varnish 4.0, Varnish 4.1 and higher are fine. This did not happen prior to the 1.5 release.
I have a gist reproing the behaviour here https://gist.github.com/glennslaven/cafb50fa21a45b7798ce9d05a7430d7f .
The text was updated successfully, but these errors were encountered: