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.5-nightly-b079d20] derivative does not work when data is missing #4263

Closed
parisholley opened this issue Sep 28, 2015 · 3 comments
Closed
Assignees

Comments

@parisholley
Copy link
Contributor

Building a dash to track my influxdb internal metrics and noticed this.

SELECT derivative(sum(points_rx)) / 10 FROM "_internal"."monitor".udp WHERE time > now() - 6h GROUP BY time(10s);

if I do not have 6 hours worth of data, it just shows as

name: udp
---------
time            
1443458060000000000 0

however moving it to last minute, it works fine

name: udp
---------
time            
1443479630000000000 412.80000000004657
1443479640000000000 329
1443479650000000000 392.5
1443479660000000000 428.89999999990687
1443479670000000000 337.20000000006985
@jwilder
Copy link
Contributor

jwilder commented Sep 28, 2015

You need to add fill(0) if you have no data.

@parisholley
Copy link
Contributor Author

@jwilder good call, may be a good talking point for #4247

that being said, it seems like a workaround? i could understand seeing no entries for the earlier points, but to not show data for the time that is available, seems unintended?

@jwilder jwilder self-assigned this Oct 1, 2015
jwilder added a commit that referenced this issue Oct 1, 2015
If an aggregate derivative query did not have a value in the first
time bucket, it would abort early and return a single row with value
of 0.  Similarly, if either the current or previous value was nil,
it would skip the row and not append any values causing gaps and
no data to show up.

Instead, this will append a nil value if either the current or previous
valis is nil.  This essentially allows nil values to carry through the
results as well as gives a more sensible value for rows where we cannot
compute a difference (instead of dropping the row as before).

Fixes #4237 #4263
@jwilder
Copy link
Contributor

jwilder commented Oct 1, 2015

Fixed by #4292

@jwilder jwilder closed this as completed Oct 1, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants