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

Trends time period #364

Closed
yurilaaziz opened this issue Mar 9, 2017 · 2 comments
Closed

Trends time period #364

yurilaaziz opened this issue Mar 9, 2017 · 2 comments

Comments

@yurilaaziz
Copy link

I'm submitting a ...

  • [ x ] Feature request

I am using grafana-Zabbix 3.3 and when the Trends is activated, It's impossible to Zoom in to get history before the trend period (7d by default)
I think it's better to add a feature that use trends only if the selected period is greater than a Trend Window.

I changed directly he dist/datasource-zabbix/datasource.js : 229,

            var useTrendsFrom = Math.ceil(dateMath.parse('now-' + this.trendsFrom) / 1000);
            var windowTrends = Math.abs(Math.ceil(dateMath.parse('now') / 1000) - useTrendsFrom);
            var useTrends = (Math.abs(timeTo - timeFrom ) > windowTrends) && this.trends;

More than that
it's better to have this feature by dashboard/Metric,
for example, Per Metric, enable Trend or history and choose the time period .

Thanks

@alexanderzobnin
Copy link
Collaborator

Yes, you're right, datasource should use trends only for range wider than trend period. I can add option like trend range, and allow to control trend usage more flexibly.

@yurilaaziz
Copy link
Author

@alexanderzobnin Do you want to fix it and send a PR ?

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