-
Notifications
You must be signed in to change notification settings - Fork 72
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
Incompatibility with collectd Plugin:ConnTrack #56
Comments
I have exactly the same issue when collecting data from Lede routers. Unfortunately I did not have the time to investigate this further, but at a first glance it seems that the problem is the located in client_golang There is also a similar issue reported on telegraf: influxdata/telegraf#2822 In the meantime the only workaround is to use the previous release. If using docker, pull |
The reason is a change in the library, but this has been discussed in various places and the result of these was that it is correct not to accept inconsistent label dimensions. What is happening is that for some reason, metrics like
are being generated. This is illegal, but this was not enforced in the past. The correct way is to pad all metrics to have the same set of label names, using empty values where there is nothing to put in a particular label. The above should be
How to do this best is somewhat dependent on the source of the metrics, so the client library cannot do this for you automatically (so it doesn't try). |
@beorn7 is there an FAQ entry or something for this? |
What One might argue only advanced use cases even run into that problem (if you hand-craft your metrics, like in this case where you have to mirror them from other metrics). I'll have an ingenious(?) plan to provide an elegant way to deal with this use case, which will be the fix of both prometheus/client_golang#355 and prometheus/client_golang#47 . It's just a few SAT days away. In different news, what @matthiasr meant as "the above should be", should actually be
|
Thanks for your replies. Indeed, it seems that collectd's conntrack plugin is sending the I'll try filter this metric for the moment to prevent failures on the instance hosting this exporter. Is it possible to discard the faulty metrics preventing the whole scraping to fail when Prometheus requests data on the exporter? |
You can try your luck with |
Following your input, I was able to make the exporter work with such metrics issue. I made a PR (see #57) for that, hoping it'll match the requirements here. |
I've been hit by this problem hard today.. took me a while to understand why the health check was restarting a pod that was previously working.. but a better approach in my opinion would be to use the log to log the wrongly formatted ( and discarded metrics ) let me explain: ( .. ( wrong metrics could be outputted as comments at least.. ) and also will return 0 data (of some thousands metrics which are fine ) to the scraper.. In my opinion your approach it's like a database crash when receive a wrong INPUT query my thoughts are that you should just output a ERROR in app logs which maybe can be downgraded to a WARN with a command flag ( something like --wrong-input-warn ) thanks, |
@fvigotti: I totally agree with your statement. Ill-formed input from a single client should definitely not result in a total crash. Otherwise this exporter is simply not suited for large-scale deployments. Conceptually spoken the incoming data has to be validated by the ingress API and only valid metrics should be passed to later processing steps. The comparison with the database perfectly illustrates this. |
While I agree that there shouldn't be a way to DOS collectd exporter like this and this needs to be fixed in both collectd and collectd_exporter, I'll document a workaround to add into your collectd.conf for those in trouble for now.
|
Note prometheus/client_golang#417 . In short: After much back and forth, it was decided that inconsistent label dimensions are actually fine. |
Hi,
When exporting data from a collectd instance having the
ConnTrack
plugin activated, I get this error:It seems that there is a mismatch between received metrics over time making the exporter to cease to function properly.
Any idea of something obvious I missed here?
Kind regards,
Vincent
The text was updated successfully, but these errors were encountered: