-
-
Notifications
You must be signed in to change notification settings - Fork 411
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
When selecting Presets "Last Day" (or Hour, Year etc.) in Graph Filters in Tree Mode the "To time" is always "2022-01-08 12:55" #6102
Comments
Clear your browser cache. |
My feeling is that the problem is related to Cacti running on FreeBSD (that is what I use). |
I have cacti 1.2.28 on FreeBSD 13.x and I don't have similar problem. I will try update to 1.2.29 ... updated. Without issue 1.2.29 on FreeBSD 13.x |
weird ... I installed from ports and in file include/global.php is hardcoded path to rra: |
Thank you for all the comments. I am just looking in to the problem and it looks like it have to do with Polling. I don't use polling since my rrd is updated by a separate shell script. What I have found so far: In ../cacti/lib/timespan_settings.php line 195: If I comment that line out the presentation works as expected. I am looking in to where "poller_lastrun_1" is updated (or in my case not updated) and try to find out where the date (2022-01-08 12:55) comes from. The above problem should not explane the date (2022-01-08 22:02:53) that is that is shown in my installation. |
I have found a difference in 1.2.27 and 1.2.28 (and 1.2.29)I have not found out where the date 2022-01-08 comes from but: There are changes made from version 1.2.27 to 1.2.28 and 1.2.29 that create the problem I have. In version 1.2.27 of timespan_settings.php:
In version 1.2.28 of timespan_settings.php:
In version 1.2.29 of timespan_settings.php:
As can be seen there are some code that was added to version 1.2.28 (and some further small change to 1.2.29) that was not present in 1.2.27. I don't know how to solve this problen in general more than comment out the line I mentioned in my previous comment in my local version. Turning on and of pollingI tried to turn on and then turn of polling to see if something changed but I could not see any difference. |
This may have something to do with the problem. We attempt to calculate the proper display time to align with the last time the device was polled through the Cacti Data Collector. Are all your Data Sources listed as 'External'? |
Thank you very much for your comment.I am not suprized that there are something strange with my Data Sources. |
Describe the bug
When selecting the "Presets" with "Last Day" (or Hour, Year etc.) in Graph Filters in Tree Mode the "To time" is always "2022-01-08 12:55".
When selecting a Custom time frame the graph is shows correct dates/times but if you go back to select "Last ___" the end time is again "2022-01-08 12:55". The end time is the same in the To-box as on the graph.
Cacti is only used to present data in rrd-files which is updated via a shell script.
I have tried to find out where the "To time" is updated (default value i guess) but I can find that the variable is named "date2" in the code but I can not figure out where the "date2" is updated to default value.
I hade this problem in version 1.2.28 and 1.2.29 but not in 1.2.27 or earlier. Cacti is running on FreeBSD 14.2-RELEASE-p1 but Cacti version 1.2.27 and 1.2.28 were running on FreeBSD 13.X. Cacti is installed via pkg and not via ports.
The time is correct on FreeBSD system: "Tue Feb 18 17:27:22 CET 2025"
When I upgraded to Cacti v1.2.29 the date shown in the Installation Wizard was 2022-01-08 22:02:53.
To Reproduce
Steps to reproduce the behavior:
Open Cacti in Tree mode.
The "Last Day" ends at 2022-01-08 12:55.
Change to a Custom time frame the end date is what you set it to e.a. 2025-02-18
When you again select Last Day the end date goes back to 2022-01-08 12:55
Expected behavior
I expect that Last day ends at current date and time
Screenshots
Installation of Cacti v1.2.29:

Graph Filter selection for Last Day:

PHP-Info:

Server
Desktop (please complete the following information)
OS: OpenSuse Tumbleweed
Browser : Brave or Firefox
Smartphone (please complete the following information)
Additional context
When looking in the logfile for creation of the graphs the time is --end='1641646500' which represents: GMT: Saturday, January 8, 2022 12:55:00 PM
The text was updated successfully, but these errors were encountered: