-
Notifications
You must be signed in to change notification settings - Fork 23
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
Multiple targets in query at once come back with mixed-up labels #26
Comments
What configuration is being used? Can you show There is a test for exactly this for template based configurations. |
@pkittenis: Here's our finders:
- influxgraph.InfluxDBFinder
influxdb:
host: dockerhost
memcache:
host: localhost I forgot to mention that this happens in 1.3.0 as well as 1.1.2. For now, we've got a work-around in place on our client to just do 4 separate queries and combine the results ourselves. Thanks! |
Thanks, that narrows it down to non-template based queries. Not sure when I'll have time to look into that, glad there is a work around. Wild card query should work too as the metrics share a common path. Could also consider moving to template based configuration as it generally performs better in influx. |
This seems to happen with template based queries too. I have my template set up as:
But for both queries:
and
The data returned is in the following order: mira_ce.host1.timer.land.all.all.count with correct values I also noted that when setting up my template as:
It works fine. Just a side note: there are 9 different values for the stat tag and 6 different values for the host tag |
Firstly and in general, prefer one target instead of multiple if there is one query that satisfies all target paths. That is the case for all the above queries, including OP ( Single target queries are faster. Multiple targets means multiple
Can be written as
The above queries have correct data. Using field in template will also have correct data, eg:
where The issue here is order of targets was used as-is by influxgraph while influx data order is sorted. For the template case, there is a fix in place in 1.3.4 and a test to replicate the above. Thanks for raising 👍 For the OP and non-templated data I haven't been able to replicate and as far as I can see when not using templates order does not matter as data is retrieved by name. However, as (a) a fix has been released for the template case where the issue was replicated, (b) there are at least two workarounds for OP and (c) multiple query targets where a single target with wildcards would be best doesn't make a lot of sense, I'm inclined to close it. Can re-open if @booch can show how to replicate. |
I'm no longer on the project that had the issue. Hey @cgeers, can you try upgrading influxgraph to 1.3.4 and reverting the work-around for this, and see if it's fixed? |
Thanks @pkittenis for the insights, I can confirm the fix solved the issue for me |
@booch thanks for the shoutout. This indeed had the desired effect. |
When I make a request like the following, I get back results with the labels in the same order I requested, but the data comes back in a different order. So the labels are attached to the wrong data.
The text was updated successfully, but these errors were encountered: