-
Notifications
You must be signed in to change notification settings - Fork 11.7k
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
Align The requested period with Interval if Interval templating is used #3781
Comments
Filed at Torkel's request https://groups.io/g/grafana/message/1221 |
is this issue still relevant ? |
I think this is still relevant as an option to offer some "stability" Currently if I'm looking at 5min intervals over last hour for example I see the intervals shifting all the time - sometimes it is say 43 to 48 min sometimes 45 to 50 etc. What this causes is where I would expect with refreshes graph to simply shift side ways with history being same it actually can change dramatically. Imagine for example I had some issue going on from 43 to 47 minutes of the hour with 5 min interval with high latency. When intervals shown at 40-45-50 I will see spike shown for 2 intervals but when on refresh when it shifts to 43-48-53 I now have only one interval showing double the spike which looks crazy. I recognize not everyone might want this but for me having fixed interval alignment which shifts for complete interval size would often be preferable |
The problem of doing it on the data source side is that it would have to be implemented in every data source that in combination with Grafana suffers this issue. I'm not sure how many of them do have this issue, but I'm sure there is more then one and at least the developers behind Prometheus do not seem to be interested in adding this type of functionality. I might be wrong, but I would like to express my opinion here in hope of helping to solve the issue that @PeterZaitsev brought up, which I believe is a major issue right now, at least in combination with Prometheus data source. There are many filed bug reports and proposals on Prometheus issue tracker related to getting Prometheus and Grafana work together nicely, but as of now, it's impossible to achieve, every proposed solution has a major flaw. It's not an isolated issue, it's basically every day thing for Grafana / Prometheus users, and can get pretty extreme, especially for very irregular / spiky metrics, example from our dashboard, refreshing every few seconds, last 6h view: another metric last 1h view: Im trying think whether the problem is on Grafana side or Prometheus side, and I think it's actually both. Ok, but this still doesn't prove the problem should be solved on Grafana side, Prometheus could do that, right? Well, I think it's not going to happen in Prometheus anytime soon, because of two reasons:
I'm sorry for a long and boring post, but after spending 2 days on this issue, I thought it would be worth to give my 2 cents. I'm hoping this will at least start a debate that would eventually lead us to a solution. |
Torkel, It is still relevant. In fact I forgot about this case and posted similar forum message couple of days ago https://community.grafana.com/t/is-it-possible-to-align-interval-start-with-interval-length/8441 |
In PMM we did a lot of work to prevent some of this. The key thing we use is the $interval for the step in Prometheus Guery which is also always aligned with the rate() computation interval. This means we're computing average for say 5 min and we're taking it every 5 minutes each data point would provide the average rate for those exact 5 minutes. For gauge metrics we do not use simple value (unless it is constant) but rather avg_over_time() or max_over_time() whatever we're trying to see. It was my experience many people do not understand how data "fitting" works by default with Grafana and what it does not do some magic averaging or other processing but simply picks 1/nth value which of course can produce bizarre views for the cases when you have some short but very relevant spikes The Interval alignment problem remains the issue. |
@PeterZaitsev just today I found alignment has been added in Grafana 5.2.0: |
@leszekeljasz Thank you so much,just upgraded grafana to 5.2.0 and this annoying crap just gone.:) |
Looks like this is was only for promethus, influx still seems to have the same issue. |
This issue has been automatically marked as stale because it has not had activity in the last year. It will be closed in 30 days if no further activity occurs. Please feel free to leave a comment if you believe the issue is still relevant. Thank you for your contributions! |
This issue has been automatically closed because it has not had any further activity in the last 30 days. Thank you for your contributions! |
A real shame to see bug reports just closed because they are old :( |
Currently Grafana uses many intervals based on the current time, for example at 13:34:56 asking for last 24 hours will look at the interval from 13:34:56 from the last day.
When uses has Interval templating enabled one would expect information to be aligned on the interval boundary, For example if I am looking at last 24 hours with Interval set to 1 hour I would rather see data from 14:00:00 last day to 14:00:00 not have potentially misleading information for the first interval in the day.
This is especially valuable for accumulated value - for example if I am looking at avg network throughput it does not matter that much if hour is complete. If I'm looking to see how much traffic in GB I'm producing per hour viewing full hours would be preferred.
The text was updated successfully, but these errors were encountered: