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

[0.9.6.1] Nth percentile for derivative series #5150

Closed
enigmapsi opened this issue Dec 17, 2015 · 5 comments
Closed

[0.9.6.1] Nth percentile for derivative series #5150

enigmapsi opened this issue Dec 17, 2015 · 5 comments

Comments

@enigmapsi
Copy link

Hi,

It seems that currently calculating Nth percentile for a DERIVATIVE() series is not possible, as PERCENTILE() only supports one field_key as an argument, and not another function.

It would be really useful to have PERCENTILE() accept a function as an argument, e.g. SELECT percentile(derivative(mean(value), 1s), 95) FROM [...]

Use case: calculating Nth percentile of bandwidth used (in bits/sec) when the database actually stores COUNTER type data, i.e. the bytes transferred since a device is powered up (this is what SNMP pollers usually get from network devices). Calculating the Nth percentile of the COUNTER type data is useless.

This is probably a feature request, but I think it's quite essential for a time-series database. If there is a way to do this currently, please let me know.

@beckettsean
Copy link
Contributor

As mentioned in my post to the mailing list we are experimenting with simplifying our open GitHub Issues. This feature request has been rolled into an aggregate issue for all function requests, so that we can close this issue until we are ready to work on it.

You may continue to make comments here. Closing the issue does not mean we are rejecting this idea.

@mrmike1
Copy link

mrmike1 commented Oct 14, 2016

The query SELECT percentile(derivative(mean(value), 1s), 95) FROM xx where xx

gives me the error

{
"error": "error parsing query: expected field argument in percentile()",
"message": "error parsing query: expected field argument in percentile()"
}

Im trying to calculate 95th percentile for bandwidth Influx 1.0.2

@beckettsean
Copy link
Contributor

@mrmike1
Copy link

mrmike1 commented Oct 14, 2016

Why are people trying it?

#6428

@beckettsean
Copy link
Contributor

@mrmike1 presumably for the same reason you did, because they want it to work.

If you read that issue and the associated PR, the fix was that running a query with nested functions inside PERCENTILE() no longer panics the database. Instead, it gives the correct error.

jsternberg added a commit that referenced this issue May 18, 2017
The test cases demonstrate that the following issues are resolved
through some newer features.

Related to #813, #5095, #2467, #5345, and #5150.
stuartcarnie pushed a commit that referenced this issue May 25, 2017
The test cases demonstrate that the following issues are resolved
through some newer features.

Related to #813, #5095, #2467, #5345, and #5150.
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

3 participants