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

impossible to get a deterministic output for selectors or aggregations #10394

Closed
rdissauer opened this issue Oct 21, 2018 · 4 comments
Closed

Comments

@rdissauer
Copy link

System info:
Linux 4.9.0-8-amd64 #1 SMP Debian 4.9.110-3+deb9u6 (2018-10-08) x86_64 GNU/Linux
InfluxDB v1.6.4 (git: 1.6 c75cdfd)

Steps to reproduce:

  1. use telegraf to send procstat to influxdb
  2. write query to select and group by stats from procstat
    for example:
    SELECT max("pid") FROM "procstat" WHERE ("host" = 'AT1LKAM01S' AND "systemd_unit" = 'kamailio.service') AND time >= now() - 1m group by time(20s) fill(0)

Expected behavior:
time max
2018-10-21T09:42:40Z 20671
2018-10-21T09:43:00Z 20671
2018-10-21T09:43:20Z 20671
2018-10-21T09:43:40Z 20671

Actual behavior:
time max
2018-10-21T09:42:40Z 20671
2018-10-21T09:43:00Z 20671
2018-10-21T09:43:20Z 20671
2018-10-21T09:43:40Z 0

same behaviour for max(), last(), mean(), ...
I also tried various combinations of time frame and group by time() values.

This makes it impossible to do a monitoring based on actual value of time series!

@dgnorton
Copy link
Contributor

dgnorton commented Oct 25, 2018

@rdissauer looks like there hadn't been any values written into the 2018-10-21T09:43:20Z - 2018-10-21T09:43:40Z window of time that satisfied the host and systemd_unit tag values requested when that query ran. Do you know for sure that there were values already in that window?

@rdissauer
Copy link
Author

@dgnorton You're right, the sliding max(), mean(),... functions show a value where there is none in the db because of the fill() function at the end.
What I want to achieve is some monitoring of a Process where the value can be >0 or null (nothing in db). As long as the process is running, telegraf writes pid values to influx but if the process dies there is no more value in db.
The thing is that with last() function I cannot use fill(0) to always get a value and with max(), mean(),... in combination with group by time(20s) and fill(0) I get a value but depending on the sliding group by window I always get 0 which leads to alertings!

Hope I could clarify my issue a bit. Thanks for you help!

@dgnorton dgnorton added the 1.x label Jan 7, 2019
@stale
Copy link

stale bot commented Jul 24, 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 24, 2019
@stale
Copy link

stale bot commented Jul 31, 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 31, 2019
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

2 participants