|
|
| Author |
Message |
fmangeant Cacti Guru User
Joined: 19 Sep 2003 Posts: 2325 Location: Sophia-Antipolis, France
|
Posted: Thu Nov 16, 2006 10:33 am Post subject: |
|
|
Many many thanks gilles for this plugin
|
|
| Back to top |
|
 |
timi Cacti User
Joined: 09 Nov 2005 Posts: 124 Location: Timisoara, Romania
|
Posted: Thu Nov 16, 2006 10:48 am Post subject: |
|
|
| this plugin works great, 10q
|
|
| Back to top |
|
 |
airwalk Cacti User
Joined: 18 Aug 2006 Posts: 103 Location: MSK, RU
|
Posted: Fri Nov 17, 2006 3:19 am Post subject: |
|
|
| nice work. thank you for another handy plugin.
|
|
| Back to top |
|
 |
TFC Cacti Pro User
Joined: 09 Apr 2003 Posts: 610 Location: Izmir/Turkey
|
Posted: Tue Jan 16, 2007 9:17 am Post subject: |
|
|
Hi,
I installed rrdcleaner.
The plugin checks unused rrd files correctly.
But when I try to delete, I get this message:
| Quote: | | aggregator_maltepe_traffic_in_816.rrd Error : unable to delete! |
I think this is about permission problem.
How can I fix it?
Here is the permission of rrd file :
| Quote: | [root@citizen rra]# ls -la agg*816*
-rw-r--r-- 1 nobody nobody 945944 Mar 2 2006 aggregator_maltepe_traffic_in_816.rrd |
And in crontab, poller.php runs with root user:
| Quote: |
*/5 * * * * root /usr/bin/php /var/www/html/cacti/poller.php > /dev/null 2>&1 |
Is there any information needed to solve the problem?
|
|
| Back to top |
|
 |
spoofiz
Joined: 28 Feb 2006 Posts: 39 Location: Koeln - D
|
Posted: Mon Feb 26, 2007 7:55 am Post subject: |
|
|
Original Post :
-------------------------------------------------
I've installed the rrdcleaner plugin but i don't see anything new on my cacti ( 0.8.6i + plugin arch V1.1) but the Backup directory field in Console>Settings>Paths.
What do I have to do to see the rrdcleaner part ?
Do i have a permission problem ?
-------------------------------------------------
EDIT : Nevermind, forgot to put the access right (Realm Permissions) in user management ...
|
|
| Back to top |
|
 |
MaffooClock
Joined: 12 Jul 2006 Posts: 17
|
Posted: Thu Mar 15, 2007 1:16 pm Post subject: |
|
|
In case this helps anyone else:
I had the "Permission denied" unlink() error, but I just knew I had the permissions set right. Yet, I continued to have the error.
I discovered a comment on the unlink() page at php.net:
http://www.php.net/manual/en/function.unlink.php#59122
In it, one commenter says you must remember to set approprriate permissions on the folder as well. So for Cacti users, if you continue to have permission issues, make sure your web server user/group has write permissions on the 'rra' folder itself.
|
|
| Back to top |
|
 |
MaffooClock
Joined: 12 Jul 2006 Posts: 17
|
Posted: Thu Mar 15, 2007 1:47 pm Post subject: |
|
|
I hope I didn't miss this same issue earlier in this thread...
After I got this plugin installed, I was able to delete dozens of old rrd files. After that initial delete run, I noticed this plugin lists files that are being used (some, not all). I know this because after each run of poller.php, the file's last access time (in this list) is incremented by five minutes! And I checked the data sources for those file names and they are, in fact, being used. After browsing the graphs, I am seeing a lot of blank graphs (some, not all) and I have a feeling the previous delete action deleted some in-use rrd files.
Yes, the clock is correct on the Cacti PC.
| Description: |
|
| Filesize: |
90.99 KB |
| Viewed: |
4114 Time(s) |

|
|
|
| Back to top |
|
 |
gandalf Developer
Joined: 02 Dec 2004 Posts: 12206 Location: Muenster, Germany
|
Posted: Thu Mar 15, 2007 2:46 pm Post subject: |
|
|
At the very early days (before it became a plugin), I dealt "a bit" with it. So my knowledge is a bit old. But I'm quite sure, that there are circumstances, where this plugin fails; e.g. externally updated rrd files. Nevertheless, I do like it. But I would always pay attention to the last update timestamp (that's why I added it) and never delete files with recent update timestamps.
Reinhard
|
|
| Back to top |
|
 |
benton2006
Joined: 01 Apr 2007 Posts: 49
|
Posted: Wed Apr 11, 2007 5:03 am Post subject: |
|
|
I meet an error like that:
Warning: Invalid argument supplied for foreach() in /var/www/html/cacti/plugins/rrdclean/rrdcleaner.php on line 38
But Gilles' patch can't be downloaded, who can give me a download link??
|
|
| Back to top |
|
 |
nocrack
Joined: 22 Jun 2006 Posts: 3
|
Posted: Wed Jul 18, 2007 10:02 am Post subject: |
|
|
Hello all
I have the same probleme than benton 2006 !!!
someone can help me ?
Thanks
|
|
| Back to top |
|
 |
Voiper99
Joined: 01 Mar 2007 Posts: 42 Location: Melbourne, Australia
|
Posted: Tue Aug 28, 2007 11:42 pm Post subject: |
|
|
| I too am having the issue where it lists some RRDs which are still being used (the timestap updates every 5 minutes). I think a good idea would be to add a feature so that you can "sort by" the columns (especially the Last Modified column) that way you can easily pick out the unused RRDs from the in use RRDs.
|
|
| Back to top |
|
 |
gandalf Developer
Joined: 02 Dec 2004 Posts: 12206 Location: Muenster, Germany
|
Posted: Thu Oct 18, 2007 12:46 pm Post subject: |
|
|
Please find the new version of RRDCleaner, V0.3, attached. From README:
| Code: | /*******************************************************************************
Author ......... Reinhard Scheck
Contact ........ gandalf @ cacti forums
Home Site ...... http://www.cacti.net
Program ........ Cacti RRD file Cleaner
Version ........ 0.3
Purpose ........ Delete unused rrd files
first published by ..... berger@hk-net.de ( 12/2004 )
first plugin by ........ Tut
modifications by ....... gilles
*******************************************************************************/
----[ Purpose
This plugin analyzes many cacti db structures
to determine unused rrd files.
----[ Features
1) allows for filtering and sorting on
- rrd file name
- date/timestamp of last rrd file modification
- size
2) file delete is done by the poller
This avoids permission errors or security issues.
The same instance that creates rrd files, the poller,
will be used for deletion as well.
----[ Prerequisites
Before you install RRDCleaner, you need to have met the following pre-requisites:
1) Cacti 0.8.6j is fully supported along with plugin arch V1.1
2) Other versions: on your own risk, but not yet tested
----[ Installation
Install is similar to other plugins.
Realm ID 36 is used. No sql import necessary
----[ Usage
----[ Additional Help?
If you need additional help, please goto forums.cacti.net.
----[ Possible Bugs?
If you figure out this problem, let me know!!!
----[ Special Thanks
I want to thank all authors mentioned in the headers
----[ Future Changes
----[ Changelog
--- SVN ---
|
Reinhard
| Description: |
A screenshot. Please notice the filter function. The last line holds a grand total of all files matching the current filter. |
|
| Filesize: |
91.64 KB |
| Viewed: |
2734 Time(s) |

|
Last edited by gandalf on Sun Oct 21, 2007 2:54 am; edited 2 times in total |
|
| Back to top |
|
 |
gandalf Developer
Joined: 02 Dec 2004 Posts: 12206 Location: Muenster, Germany
|
Posted: Sat Oct 20, 2007 12:19 pm Post subject: |
|
|
Some few enhacements
Reformatted messages
Rounding of filesize
Omit rereading files when sorting or filtering
Reinhard
Last edited by gandalf on Sun Oct 21, 2007 2:52 am; edited 1 time in total |
|
| Back to top |
|
 |
apperrault Cacti User
Joined: 16 Feb 2007 Posts: 351 Location: Emeryville, CA
|
Posted: Sat Oct 20, 2007 3:22 pm Post subject: |
|
|
Gandolf,
i get the following message after installing the most recent version.
| Code: | | Notice: Undefined index: rrdcleaner.php:restart in E:\cacti\lib\functions.php on line 1422 |
please let me know how to proceed. i get this at the top of the rrdclean page.
app
|
|
| Back to top |
|
 |
gandalf Developer
Joined: 02 Dec 2004 Posts: 12206 Location: Muenster, Germany
|
Posted: Sun Oct 21, 2007 2:53 am Post subject: |
|
|
Sorry for that missing line. New Code attached, only removed this error.
Reinhard
| Description: |
|
 Download |
| Filename: |
rrdclean-031.tgz |
| Filesize: |
6.85 KB |
| Downloaded: |
225 Time(s) |
|
|
| Back to top |
|
 |
|