Skip to content
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

Wire up SORDER #1819

Closed
pauldix opened this issue Mar 3, 2015 · 32 comments
Closed

Wire up SORDER #1819

pauldix opened this issue Mar 3, 2015 · 32 comments

Comments

@pauldix
Copy link
Member

pauldix commented Mar 3, 2015

SORDER is a way to order the series returned in a result. This is useful if you're going to return the top or bottom series by some function. For example:

SELECT mean(value)
FROM cpu
WHERE time > now() - 24h
GROUP BY time(1h), host
SORDER max(value) 5m desc
SLIMIT 5

This query says to take the most recent 5m period in the query's time range and compute the max for every host. It would then order those in descending order and then take the first 5 and do queries for them to get their series.

This was referenced Mar 3, 2015
@beckettsean beckettsean added this to the 0.9.0 milestone Apr 20, 2015
@toddboom toddboom modified the milestones: 0.9.0, 0.9.1 May 8, 2015
@beckettsean beckettsean modified the milestones: 0.9.2, 0.9.1 Jun 16, 2015
@beckettsean beckettsean modified the milestones: 0.9.4, 0.9.2 Jul 15, 2015
@srikara
Copy link

srikara commented Aug 7, 2015

+1

@pauldix pauldix modified the milestones: Future Point Release, 0.9.4 Aug 27, 2015
@will-prcm
Copy link

+1

2 similar comments
@zapient
Copy link

zapient commented Nov 11, 2015

+1

@Kaelten
Copy link

Kaelten commented Jan 4, 2016

+1

@vlitvin
Copy link

vlitvin commented Jan 30, 2016

+1

@nordewal
Copy link

that would be a really useful feature. is there working going on in regards to this?

@tbriggs-curse
Copy link

+1

@Kaelten
Copy link

Kaelten commented Aug 17, 2016

Please reopen and schedule. This feature would make influxdb much more useful.

@Kaelten
Copy link

Kaelten commented Aug 18, 2016

That's exactly my use case as well. We're monitoring hundreds of servers and storing metrics in InfluxDB. Not having a SORDER operator has been a major limiting factor on how useful our graphing is.

It's too the point where when I have down time I'm going to see if I can figure out how to implement it myself

Thank you for reopening this.

@bimalm
Copy link

bimalm commented Oct 5, 2016

+1

@clheikes
Copy link

I'm looking for an influxdb equivalent to graphite's highestAverage. Other posts have mentioned this but they eventually link to #5930 which contains "Top accepts nested functions", but from what i've seen the top function doesn't return a series.

This looks like the feature request i need to follow. Can anybody confirm?

@vlitvin
Copy link

vlitvin commented Dec 21, 2016

@clheikes Yeah, totally, all we need from SORDER is to do something like "SORDER BY mean(bytes) DESC LIMIT 10", which would be full analog of highestAverage. But, further, it allows all sorts of series sorting.

from what i've seen the top function doesn't return a series.

Yep, so I have custom script to achieve this (metrics are assigned back to series), but it leads to null values in series and more series returned, for example top(10) would lead to ~30 series. Of course number of series depends on data.

@mhiller
Copy link

mhiller commented Dec 21, 2016

@clheikes this is a pretty big missing functionality and from reading various threads people dont seem to under that the "fix" they are pushing is not actually what the want. they needs a time series of "top".

@vlitvin Could you share an example of your script in a Gist ? it would be helpful.

@white-hat
Copy link

Without SORDER we can't switch from Prometheus to influxdb enterprise, please add this feature

@pauldix
Copy link
Member Author

pauldix commented Feb 15, 2017

@white-hat can you give me a little more detail about what you're trying to do with the query?

@Kaelten
Copy link

Kaelten commented Feb 15, 2017

@pauldix in my use case SLIMIT is kinda useless without SORDER. I can graph a line per server for example but I can't say 'show me the worst 10'. Makes a lot of dashboarding much less useful

@pauldix
Copy link
Member Author

pauldix commented Feb 15, 2017

@Kaelten the worst 10 based on what criteria? For example, look at the most recent cpu system utilization for every server and take the highest 10 servers, then query them for some period of time? Is it important to say worst over some longer period or the entire period for what is returned?

@Kaelten
Copy link

Kaelten commented Feb 15, 2017

@pauldix without SORDER I get a random 10 series. With SORDER I should be able to say 'order by avg cpu utilization' or 'max 15 min load' or other similar statements. Right now if I query and get back 30 series and SLIMIT it to 10 I have no idea if I'm being the most useful 10.

In our case we have ~ 900 servers monitored right now and some charts have too many series on them to be even remotely useful or actionable. SLIMIT with SORDER would make these charts significantly more useful.

@LionelCons
Copy link

We really miss the following Graphite functions that limit the number of series returned based on some criteria: highestAverage, highestCurrent, highestMax, lowestAverage, lowestCurrent as well as mostDeviant.

All these Graphite functions order the series (aka SORDER) before limiting the number of series returned (aka SLIMIT).

@elvishsu66
Copy link

It would be really nice to have SORDER feature unless someone can come up an alternative solution

@Deriul
Copy link

Deriul commented Jul 21, 2017

I agree. The lack of that feature is the only reason why we have to use graphite+influx.

@PaulieShore
Copy link

Another +1 here. I recently switched from Graphite to InfluxDB. I rely on functions like highestAverage, highestCurrent, and highestMax for our dashboard as we then limit the results in Grafana using a a template for "Top Resources". With Graphite this is incredibly simple to achieve.

@rbetts rbetts removed this from the Future Point Release milestone Oct 27, 2017
@aurimasplu
Copy link

+1
@rbetts you mean this will not be developed?

@dolvany
Copy link

dolvany commented Feb 14, 2018

This is absolutely the most glaring feature omission in influxdb.

@rbetts
Copy link
Contributor

rbetts commented Feb 14, 2018

This feature will be delivered through IFQL. You can read the ifql announcement and a more recent update. We also blog each completed ifql iteration as we continue early development. You can follow the ifql repository to track our progress.

We aren't far enough along yet to publicize a release date for IFQL 1.0; however, we are doing all of the development in the open and welcome your feedback and thoughts. We package the query processor in the influxdata sandbox, if you'd like to install and try it in its current state.

We appreciate your feedback about desired query functionality. We read and listen to all of your comments even when we can't always reply promptly.

@stale
Copy link

stale bot commented Jul 23, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix label Jul 23, 2019
@stale
Copy link

stale bot commented Jul 30, 2019

This issue has been automatically closed because it has not had recent activity. Please reopen if this issue is still important to you. Thank you for your contributions.

@stale stale bot closed this as completed Jul 30, 2019
@clheikes
Copy link

@nathanielc
Is there a working example of the functionality described here in flux?

@marrotte
Copy link

marrotte commented Sep 12, 2019

Is the original issue solvable with InfluxSQl or IFLQ, yet? Is there a way to order series on an aggregate or selector?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests