Time for action – finding orphaned RRD files
Logon to your Cacti system.
Change to the
rra
directory of your Cacti installation:cd /var/www/html/cacti/rra
List the directory content:
ls –l
Keep a note of the RRDs listed as shown in the preceding screenshot.
Login to your Cacti web interface as an admin user.
Go to Management | Data Sources to list all the data sources:
You can now compare the list of data sources with the RRD files listed on the command line. In the example shown, the RRD file named
heute_de_ping_8.rrd
does not exist in the web interface and is therefore an orphaned file.
What just happened?
You have used the CLI and the Cacti GUI to find unused RRD files which can be removed from the file system. As you create more graphs and data sources, the manual process quickly becomes overwhelming, so you are going to build a short script to perform this task for you.
Tip
The RRDCleaner
plugin provides the same functionality but adds this to the Cacti GUI itself.