-
-
Notifications
You must be signed in to change notification settings - Fork 437
When removing graphs, RRA files may be left behind #5868
Description
Describe the bug
When try to remove Orphaned Graphs from GUI, following error is written to the log:
2024-10-17 08:55:23 - MAINT <path_rra>/myrrd_73499.rrd ERROR: RRDfile Maintenance unable to delete from /var/www/html/cacti/rra!
2024-10-17 08:55:23 - CMDPHP PHP ERROR WARNING Backtrace: (/poller_maintenance.php[98]:rrdfile_purge(), /poller_maintenance.php[272]:remove_files(), /poller_maintenance.php[560]:unlink(), CactiErrorHandler())
2024-10-17 08:55:23 - ERROR PHP WARNING: unlink(/var/www/html/cacti/rra/<path_rra>/myrrd_73499.rrd): No such file or directory in file: /var/www/html/cacti/poller_maintenance.php on line: 560
we think the path cannot be found because <path_rra> is added to the path string.
If we check in the path the file exists:
cacti:/var/www/html/cacti/rra# ls -latr myrrd_73497.rrd
-rwxrwxr-x 1 www-data www-data 95608 Oct 17 07:20 myrrd_73497.rrd
If we check on Console - System Utilities - RRDfile Cleaner then click on Rescan, the table will be populated.
To Reproduce
Steps to reproduce the behavior:
-
Go to 'Console - Management - Graphs'
-
Flag on 'Orphaned'
-
Select all Orphaned Graphs - Choose an action "Delete" and click "Go"
-
Error in Logs - cacti.log:
2024-10-17 08:55:23 - MAINT <path_rra>/myrrd_73499.rrd ERROR: RRDfile Maintenance unable to delete from /var/www/html/cacti/rra!
2024-10-17 08:55:23 - CMDPHP PHP ERROR WARNING Backtrace: (/poller_maintenance.php[98]:rrdfile_purge(), /poller_maintenance.php[272]:remove_files(), /poller_maintenance.php[560]:unlink(), CactiErrorHandler())
2024-10-17 08:55:23 - ERROR PHP WARNING: unlink(/var/www/html/cacti/rra/<path_rra>/myrrd_73499.rrd): No such file or directory in file: /var/www/html/cacti/poller_maintenance.php on line: 560
- If we check in the path the file exists:
cacti:/var/www/html/cacti/rra# ls -latr myrrd_73497.rrd
-rwxrwxr-x 1 www-data www-data 95608 Oct 17 07:20 myrrd_73497.rrd
-
No Orphaned Graphs in Cacti GUI (see screenshot)
-
If we check on Console - System Utilities - RRDfile Cleaner then click on Rescan, the table will be populated (see screenshot)
Expected behavior
rrd file deleted, no error in cacti.log
Screenshots
Desktop (please complete the following information)
-
OS: [e.g. iOS]
-
Browser Chrome, Firefox and Edge on Windows 11
-
Version [e.g. 22]
Smartphone (please complete the following information)
-
Device: [e.g. iPhone6]
-
OS: [e.g. iOS8.1]
-
Browser [e.g. stock browser, safari]
-
Version [e.g. 22]
Additional context
Add any other context about the problem here.

