Presets Time in Cacti 1.2.28 Not Automatically Updating?
Moderators: Developers, Moderators
Presets Time in Cacti 1.2.28 Not Automatically Updating?
Hi All!
I'm currently using Cacti version 1.2.28 and have noticed something odd regarding the "Presets time" behavior. I expected that when I select a preset time (like "Last 24 hours"), it should display the most recent 24-hour period from the current moment when the page is viewed or refreshed. However, I’ve noticed that the time is only updated at login. After, say, 20 minutes of being logged in, the preset time doesn't refresh to show the most recent 24 hours. I have to log out and back in to get the correct time range again.
Is this expected behavior, or could it be a bug in the software? Has anyone else experienced this? Any advice on how to get the preset time to refresh automatically?
By the way, big thanks to the developers for all their hard work on Cacti! It's a fantastic tool that I’ve been using for a while now, and I really appreciate all the improvements and new features in each release.
Thanks for any insights!
I'm currently using Cacti version 1.2.28 and have noticed something odd regarding the "Presets time" behavior. I expected that when I select a preset time (like "Last 24 hours"), it should display the most recent 24-hour period from the current moment when the page is viewed or refreshed. However, I’ve noticed that the time is only updated at login. After, say, 20 minutes of being logged in, the preset time doesn't refresh to show the most recent 24 hours. I have to log out and back in to get the correct time range again.
Is this expected behavior, or could it be a bug in the software? Has anyone else experienced this? Any advice on how to get the preset time to refresh automatically?
By the way, big thanks to the developers for all their hard work on Cacti! It's a fantastic tool that I’ve been using for a while now, and I really appreciate all the improvements and new features in each release.
Thanks for any insights!
Best regards,
HaflingeR.
HaflingeR.
Re: Presets Time in Cacti 1.2.28 Not Automatically Updating?
cannot reproduce it. Could you try another browser?
Try to clear browser cache too
Try to clear browser cache too
Let the Cacti grow!
Re: Presets Time in Cacti 1.2.28 Not Automatically Updating?
Thanks for your suggestion!
I tried using both Edge and Firefox, but I encountered the same issue in both browsers. Clearing the browser cache didn't resolve the problem either.
One thing I can mention, just in case it's relevant, is that I had previously configured my timezone in the config.php file with the following line:
I added this setting back when I was using an older version of Cacti. I'm not sure if it has anything to do with the issue, but I thought it might be worth mentioning.
Any other ideas on what could be causing this?
Thanks again for your help!
I tried using both Edge and Firefox, but I encountered the same issue in both browsers. Clearing the browser cache didn't resolve the problem either.
One thing I can mention, just in case it's relevant, is that I had previously configured my timezone in the config.php file with the following line:
Code: Select all
date_default_timezone_set('Europe/Warsaw'); // Time-Zone settings
Any other ideas on what could be causing this?
Thanks again for your help!
Best regards,
HaflingeR.
HaflingeR.
Re: Presets Time in Cacti 1.2.28 Not Automatically Updating?
Quick update:
I noticed that in the user settings, the auto-refresh interval is set to 5 minutes, and the page does refresh after 5 minutes as expected. However, the time range still remains unchanged (it continues to show the last 24 hours from the time I logged in). The time filter in the graph view doesn't update automatically to reflect the most recent 24-hour period.
Any thoughts on why this might be happening?
Thanks again for your support!
I noticed that in the user settings, the auto-refresh interval is set to 5 minutes, and the page does refresh after 5 minutes as expected. However, the time range still remains unchanged (it continues to show the last 24 hours from the time I logged in). The time filter in the graph view doesn't update automatically to reflect the most recent 24-hour period.
Any thoughts on why this might be happening?
Thanks again for your support!
Best regards,
HaflingeR.
HaflingeR.
Re: Presets Time in Cacti 1.2.28 Not Automatically Updating?
Here is a detailed technical report based on the provided PHP info output, for reporting or documentation purposes:
Code: Select all
Server Information - LINUX Ubuntu 22.04.5 LTS (Jammy Jellyfish)
Kernel: Linux cacti01 5.15.0-122-generic #132-Ubuntu SMP Thu Aug 29 13:45:52 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux
Apache Version: Apache/2.4.52 (Ubuntu)
Apache API Version: 20120211
Server Administrator: webmaster@localhost
Hostname: localhost:443
User/Group: www-data(33)/33
Max Requests per Child: 0
Keep-Alive: On
Max Keep-Alive Requests per Connection: 100
Connection Timeout: 300 seconds
Keep-Alive Timeout: 5 seconds
Virtual Server: Yes
Server Root: /etc/apache2
Apache Modules Loaded
Loaded Modules: core, mod_so, mod_watchdog, http_core, mod_log_config, mod_logio, mod_version, mod_unixd, mod_access_compat, mod_alias, mod_auth_basic, mod_authn_core, mod_authn_file, mod_authz_core, mod_authz_host, mod_authz_user, mod_autoindex, mod_deflate, mod_dir, mod_env, mod_filter, mod_mime, prefork, mod_negotiation, mod_php, mod_reqtimeout, mod_setenvif, mod_socache_shmcb, mod_ssl, mod_status
SSL Information
HTTPS: Enabled
SSL Protocol: TLSv1.3
SSL Version Interface: mod_ssl/2.4.52
SSL Version Library: OpenSSL/3.0.2
SSL Compression Method: NULL
SSL Cipher: TLS_AES_128_GCM_SHA256
SSL Cipher Key Size: 128 bits
SSL Server Certificate:
Issuer: [cut]
Valid From: Oct 6, 2024
Valid Until: Oct 5, 2025
Common Name (CN): [cut]
Organization (O): [cut]
Location: [cut]
Serial Number: [cut]
Public Key Algorithm: RSA Encryption
Signature Algorithm: sha256WithRSAEncryption
Subject Alternative Names (SANs): [cut]
PHP Core Settings
PHP Version: 8.1.2-1ubuntu2.19
Allow URL fopen: On
Allow URL include: Off
Display Errors: Off
Max Execution Time: 60 seconds
Memory Limit: 512M
Post Max Size: 8M
Upload Max Filesize: 2M
Error Reporting Level: 22527
Timezone: Europe/Warsaw
Session Settings
Session Support: Enabled
Session Handler: Files
Session Save Path: /var/lib/php/sessions
Session Name: Cacti
Session Cookie Secure: Yes (for HTTPS)
Session Cookie SameSite: Strict
Session Auto Start: Off
Session GC Max Lifetime: 1440 seconds
Loaded PHP Extensions
Calendar Support: Enabled
Ctype Functions: Enabled
Date/Time Support: Enabled
DOM Support: Enabled
EXIF Support: Enabled
Supported File Types: JPEG, TIFF
Multibyte Decoding: Enabled
Fileinfo Support: Enabled
FTP Support: Enabled
GD Support: Enabled
Supported Image Formats: JPEG, PNG, GIF, WebP, BMP
GetText Support: Enabled
GMP Support: Enabled (Version: 6.2.1)
Hashing Engines: MD5, SHA1, SHA256, SHA512, etc.
Iconv Support: Enabled
Intl Support: Enabled
ICU Version: 70.1
JSON Support: Enabled
LDAP Support: Enabled (OpenLDAP API Version: 3001)
LibXML Version: 2.9.13
Multibyte String Support (mbstring): Enabled
mysqli Client API Version: mysqlnd 8.1.2-1ubuntu2.19
OpenSSL Support: Enabled (Library Version: OpenSSL 3.0.2)
PDO Drivers: mysql
Phar Support: Enabled
POSIX Support: Enabled
Readline Support: Enabled
Reflection Support: Enabled
SimpleXML Support: Enabled
SNMP Support: Enabled (NET-SNMP Version 5.9.1)
Sockets Support: Enabled
Sodium Library Version: 1.0.18
Database Support
PDO Drivers: mysql
MySQLi Default Port: 3306
MySQLi Default Socket: /var/run/mysqld/mysqld.sock
Logging
Log Errors: On
Error Log Path: Not specified
Miscellaneous
expose_php: Off
Mail Log: Not specified
Max File Uploads: 20
Output Buffering: 4096 bytes
Realpath Cache Size: 4096K
Realpath Cache TTL: 120 seconds
Best regards,
HaflingeR.
HaflingeR.
-
- Cacti User
- Posts: 92
- Joined: Wed Feb 27, 2013 10:57 am
- Location: Portland, OR
- Contact:
Re: Presets Time in Cacti 1.2.28 Not Automatically Updating?
I'm experiencing this as well. I've tried different browsers (FF/Chrome) with the same experience. The graphs load correctly upon login, but then will not refresh. Closing the browser sometimes works, but it's really only resolved by logging out and back into the Cacti UI.
-
- Cacti User
- Posts: 92
- Joined: Wed Feb 27, 2013 10:57 am
- Location: Portland, OR
- Contact:
Re: Presets Time in Cacti 1.2.28 Not Automatically Updating?
I just confirmed that clearing the cache does not do the trick (in FF at least)
Cleared cache, hit the 'Go' button in Cacti, no change.
Hit refresh the whole page, no change.
Closed the browser and reloaded, no change.
Logged out of Cacti and back in, data refreshed.
Cleared cache, hit the 'Go' button in Cacti, no change.
Hit refresh the whole page, no change.
Closed the browser and reloaded, no change.
Logged out of Cacti and back in, data refreshed.
Re: Presets Time in Cacti 1.2.28 Not Automatically Updating?
Update:
While upgrading another instance of Cacti from version 1.2.27 to 1.2.28, I encountered the same problem where the time in the “Presets” setting does not update correctly when refreshing the page.
What can I check or do?
Thanks in advance for any ideas
While upgrading another instance of Cacti from version 1.2.27 to 1.2.28, I encountered the same problem where the time in the “Presets” setting does not update correctly when refreshing the page.
What can I check or do?
Thanks in advance for any ideas
Best regards,
HaflingeR.
HaflingeR.
Re: Presets Time in Cacti 1.2.28 Not Automatically Updating?
Update: I did test. I have installed version 1.2.27 and and 1.2.28 (fresh installation).
On version 1.2.27 presets time behavior is correct and on the latest version it is wrong - as I described in the thread.
On version 1.2.27 presets time behavior is correct and on the latest version it is wrong - as I described in the thread.
Best regards,
HaflingeR.
HaflingeR.
Re: Presets Time in Cacti 1.2.28 Not Automatically Updating?
any errors or warning in browser developer tools -> console?
Let the Cacti grow!
Re: Presets Time in Cacti 1.2.28 Not Automatically Updating?
It seems the read_config_option function cannot get a correct value.
I change line 195 in timespan_settings.php from:
to:
It works again.
I change line 195 in timespan_settings.php from:
Code: Select all
$time = read_config_option('poller_lastrun_1');
Code: Select all
$time = time();
Re: Presets Time in Cacti 1.2.28 Not Automatically Updating?
I can confirm that this modification fixed it and now it works properly. Thanks!
Best regards,
HaflingeR.
HaflingeR.
-
- Cacti User
- Posts: 92
- Joined: Wed Feb 27, 2013 10:57 am
- Location: Portland, OR
- Contact:
Re: Presets Time in Cacti 1.2.28 Not Automatically Updating?
This change did work for me as well
Re: Presets Time in Cacti 1.2.28 Not Automatically Updating?
It was fixed here
https://github.com/Cacti/cacti/commit/8 ... 781dcd89b5
Update to actual 1.2.x branch
https://github.com/Cacti/cacti/commit/8 ... 781dcd89b5
Update to actual 1.2.x branch
Let the Cacti grow!
Re: Presets Time in Cacti 1.2.28 Not Automatically Updating?
I would like to confirm that the proposed change in line 195 has resolved the issue across all my installations.
Thank you for your support.
Thank you for your support.
Best regards,
HaflingeR.
HaflingeR.
Who is online
Users browsing this forum: No registered users and 0 guests