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

[Feature request] send dashboard from,to time range with /metrics/find graphite queries #8055

Closed
woodsaj opened this Issue Apr 6, 2017 · 3 comments

Comments

Projects
None yet
4 participants
@woodsaj
Member

woodsaj commented Apr 6, 2017

The /metrics/find graphite api method accepts "to" and "from" parameters (epoch timestamps).
Though not used with Whisper, other backends like Ceres and metrictank can use these timestamps to filter results. So only series that have data for the specified time range are returned.

It would be great if the graphite datasource could pass these parameters when the query editor lists series and when template variables are fetched. This would be extremely beneficial in environments that are very dynamic, which are becoming more common.

@torkelo torkelo added this to the 4.3.0 milestone Apr 6, 2017

@Dieterbe

This comment has been minimized.

Show comment
Hide comment
@Dieterbe

Dieterbe Apr 6, 2017

Contributor

i envision there would be an indicator in the grafana editor that visualizes whether this time based filtering is enabled or not, and the user could toggle it on and off.
Because I think there's cases where this behavior is desired, but also sometimes it's not desirable e.g. when crafting a graph to visualize stats, you don't want to be impeded by certain metrics coincidentally not having been sent for a while. If this behavior was always on, you'd have to reload your dashboard with a timerange of a very long time, just to know the metrics you may want to include in charts will show up in the editor. Though this approach is useful to let you say "i want to compose a chart only using metrics that have been seen in x time", then you can just adjust the dashboard time range (though this can be expensive and slow) and continue editing.

Contributor

Dieterbe commented Apr 6, 2017

i envision there would be an indicator in the grafana editor that visualizes whether this time based filtering is enabled or not, and the user could toggle it on and off.
Because I think there's cases where this behavior is desired, but also sometimes it's not desirable e.g. when crafting a graph to visualize stats, you don't want to be impeded by certain metrics coincidentally not having been sent for a while. If this behavior was always on, you'd have to reload your dashboard with a timerange of a very long time, just to know the metrics you may want to include in charts will show up in the editor. Though this approach is useful to let you say "i want to compose a chart only using metrics that have been seen in x time", then you can just adjust the dashboard time range (though this can be expensive and slow) and continue editing.

@nopzor1200

This comment has been minimized.

Show comment
Hide comment
@nopzor1200

nopzor1200 Jul 26, 2017

Contributor

@torkelo lets talk about this soon, and see if we can get this done. Catching up with @woodsaj and this seems like a really small change in Grafana that would be really good for both GrafanaCloud and Graphite (but not for the whisper finder...).

Contributor

nopzor1200 commented Jul 26, 2017

@torkelo lets talk about this soon, and see if we can get this done. Catching up with @woodsaj and this seems like a really small change in Grafana that would be really good for both GrafanaCloud and Graphite (but not for the whisper finder...).

@torkelo torkelo modified the milestones: 4.4.2, 5.0 Jul 31, 2017

@torkelo torkelo closed this in 44fbd3e Jul 31, 2017

@torkelo

This comment has been minimized.

Show comment
Hide comment
@torkelo

torkelo Jul 31, 2017

Member

this is now implemented in master. I could not include it in 4.4.2 as the changes was to substantive and I would like some feedback on it before committing it to a release.

Query editor

from & until are now added in all metric looks ups from the query editor (panel metrics tab). That is when you click on select metric or an existing metric node. There is one exception and that is a call to metrics/find that validates that the current path exists & the last node is a leaf, this validation I think should not include panel time range as when the validation fails it will add a "select metric" node, which would be bad if it's just due to time range not having the current metric.

Template variables

Template variables that have refresh option set to "On Time Range Change" will include from/until in metrics/find request, but variables with refresh option set to "On Dashboard Load" and "Never" will not include the time range in metrics/find calls.

Member

torkelo commented Jul 31, 2017

this is now implemented in master. I could not include it in 4.4.2 as the changes was to substantive and I would like some feedback on it before committing it to a release.

Query editor

from & until are now added in all metric looks ups from the query editor (panel metrics tab). That is when you click on select metric or an existing metric node. There is one exception and that is a call to metrics/find that validates that the current path exists & the last node is a leaf, this validation I think should not include panel time range as when the validation fails it will add a "select metric" node, which would be bad if it's just due to time range not having the current metric.

Template variables

Template variables that have refresh option set to "On Time Range Change" will include from/until in metrics/find request, but variables with refresh option set to "On Dashboard Load" and "Never" will not include the time range in metrics/find calls.

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