Cacti / cacti

Cacti ™
http://www.cacti.net
GNU General Public License v2.0
1.65k stars 406 forks source link

Customized timespan for graphs #819

Closed hadeshimself closed 7 years ago

hadeshimself commented 7 years ago

Currently the graph timespan in graph.php for each RRA name is calculated according to the RRA properties (steps, rows, etc). Sometimes this is not a good reference, specially for high rate collection profiles or profiles with larger precision and faster polling rates (30 seconds, etc). It would be nice to have a configurable timespan parameter for each of those RRAs to allow a more customized presentation.

ikorzha commented 7 years ago

I agree with you hope Cacti team would address this deficiency Here is my example, I have 1min RRA setup for 2 month pretension in RRDs. Look what kind of mess it introduces when, the graph is called from THOLD: It shows 2 month worth of graph data without any drill in ability instead of perhaps last 1hr or 2hr. mess

cigamit commented 7 years ago

I actually de-contented that during the design of Data Source Profiles thinking that it was not too important. After doing so, I realized that it was important for the MRTG view and could be useful in other areas as well.

cigamit commented 7 years ago

Resolved, please review the commit change very carefully.

ikorzha commented 7 years ago

Cigamit, I was able to test and validate the fix for customized time span! Thank you so much, based on testing I have conducted so far, I do not see any issues with fix you have introduced customized time span works as expected.

Thank you once again for dedicated work.

cigamit commented 7 years ago

Good to know. I also changed the form so that you can update the timespan when the profile is read only as updating the timespan does not alter the RRDfiles.

ikorzha commented 7 years ago

I have validated "the new edit timespan" commit. Yes I can click on it now and see what is currently defined. However when I change timespan lets say from 2hr to 4hr and click save, I get Error msg below. Please note, I didn't make or attempt to make any changes to "ROWS" field which is locked.

commit-819

cigamit commented 7 years ago

Thanks for testing. Fixed now.

ikorzha commented 7 years ago

Tested hot fix. Confirmed save now works! Thanks.