Cacti (home)ForumsRepositoryDocumentation
Cacti: offical forums and support  

 FAQFAQ   SearchSearch   MemberlistMemberlist    RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in    


rrdCleaner - cleans cactis rrd dir from unused rrd's
Goto page Previous  1, 2, 3, 4, 5, 6, 7, 8, 9, 10  Next
 
Post new topic   Reply to topic    Cacti Forum Index -> Plugin Announcements
Author Message
TheWitness
Developer


Joined: 14 May 2002
Posts: 9736
Location: MI, USA

PostPosted: Tue Nov 15, 2005 2:53 pm    Post subject: Reply with quote

Sit tight guys, I will implment as a core functionality. Don't get too excited. The code looks like it nees some more work. Ok.

Larry
Back to top
spignataro



Joined: 07 Nov 2005
Posts: 41

PostPosted: Tue Nov 15, 2005 3:31 pm    Post subject: Reply with quote

TheWitness wrote:
Sit tight guys, I will implment as a core functionality. Don't get too excited. The code looks like it nees some more work. Ok.

Larry


it does need some extra work...but it would be great to see as part of the core. Will this be part of an upgrade for the 8 release or will it be part of 9 release?
Back to top
Tut`



Joined: 21 Jul 2005
Posts: 11

PostPosted: Tue Nov 15, 2005 3:52 pm    Post subject: Reply with quote

I modified sql query and added Archive function (if we could call it a function :p)

Last and final update.



rrdclean.zip
 Description:

Download
 Filename:  rrdclean.zip
 Filesize:  2.49 KB
 Downloaded:  741 Time(s)

Back to top
spignataro



Joined: 07 Nov 2005
Posts: 41

PostPosted: Tue Nov 15, 2005 4:08 pm    Post subject: Reply with quote

it works wonderfully now. Perfect

Thanks. I see where the problem was and thanks for the quick fix.
Back to top
Tut`



Joined: 21 Jul 2005
Posts: 11

PostPosted: Tue Nov 15, 2005 4:11 pm    Post subject: Reply with quote

it's not really perfect. The query will only return unknown rrd file. If you delete a graph without deleting data source, the rrd won't be updated but it still "known".
Back to top
spignataro



Joined: 07 Nov 2005
Posts: 41

PostPosted: Tue Nov 15, 2005 4:39 pm    Post subject: Reply with quote

i know it is not perfect...but it is working alot better now.
Back to top
aestevez



Joined: 02 Nov 2005
Posts: 2

PostPosted: Fri Nov 25, 2005 3:57 am    Post subject: Better Reply with quote

I was made some changes in order to the $files_unused = 0.


rrdclean.zip
 Description:

Download
 Filename:  rrdclean.zip
 Filesize:  2.71 KB
 Downloaded:  594 Time(s)

Back to top
knobdy
Cacti User


Joined: 28 Sep 2005
Posts: 495

PostPosted: Mon Mar 13, 2006 3:17 pm    Post subject: Reply with quote

Obviously I missed this one when it first came out - but I've got it now. As expected, it found a lot of rrd files I no longer use. Unfortunately, it won't delete them and doesn't tell me WHY it won't delete them!

r4_fivemin_1599.rrd Error : unable to delete!
Back to top
TheWitness
Developer


Joined: 14 May 2002
Posts: 9736
Location: MI, USA

PostPosted: Mon Mar 13, 2006 8:19 pm    Post subject: Reply with quote

Permissions.
Back to top
knobdy
Cacti User


Joined: 28 Sep 2005
Posts: 495

PostPosted: Tue Mar 14, 2006 9:39 am    Post subject: Reply with quote

Who has to have access? Thats the first thing I checked, and then changed everything in the RRA folder to cactiusers:users.

It is curious that many of those files were originally cactiuser:root - but, regardless, it still won't delete them. I've chmod 666 even...
Back to top
Pumpi
Cacti User


Joined: 14 Jan 2004
Posts: 256
Location: Germany

PostPosted: Tue Mar 14, 2006 10:07 am    Post subject: Reply with quote

knoby,

try to assign user/group permission of your apache2 server account to the rra directory and your backup directory if you want use this feature.

For example I use wwwrun as user and www as group and it works.

I only get an error after I have cleaned all files
Code:
Warning: Invalid argument supplied for foreach() in /srv/www/htdocs/cacti/plugins/rrdclean/rrdcleaner.php on line 38
 


but in general it works.
Back to top
gilles
Cacti User


Joined: 12 Jul 2005
Posts: 216

PostPosted: Sun May 14, 2006 12:34 pm    Post subject: Reply with quote

i have resolved a bug

http://gilles.boulon.free.fr/rrdclean/rrdclean-1.2-modified.zip



bug.JPG
 Description:
bug
 Filesize:  14.94 KB
 Viewed:  8851 Time(s)

bug.JPG




Last edited by gilles on Sat Jul 22, 2006 6:21 pm; edited 3 times in total
Back to top
ScOp3
Cacti User


Joined: 03 Aug 2005
Posts: 59
Location: Cologne Germany

PostPosted: Mon May 15, 2006 4:38 am    Post subject: Reply with quote

gilles wrote:
i have resolved a bug


Thanks!
Back to top
bossi



Joined: 19 May 2006
Posts: 5

PostPosted: Sat May 20, 2006 5:17 pm    Post subject: rrdcleaner Reply with quote

no chance to get that thing running. I'm running FC5 and cacti 0.8.6.h.
is there somewhere a procedure what to change and where?

''

Code:
I got this one to run:

RRDCleaner
 12/2004 by berger@hk-net.de
 
 Deletes unused .rrd-files in cactis rrd/ directory
 Note: You should know what you are doing!
 On errors: Check if the rrd/ dir is writeble by the webserver-user!
 
 Usage:
 put rrdcleaner.php in the cacti-root dir.

 Beginners:
 Delete rrdcleaner.php after usage for security reasons.

 Professionals:
 To use cactis build in authentication modify the $user_auth_realm_filenames array in
 include/config_arrays.php (line 272).

   Add the following line:
   "rrdcleaner.php" => 1

 After that, uncomment one of the following lines:
*/

//To use cacti authentication uncomment this:
//include("include/auth.php");

//To use cacti authentication comment this out:
include("include/config.php");
.
.

but it seems pretty old and you added new features.
any help is appreciated

thx
Back to top
gilles
Cacti User


Joined: 12 Jul 2005
Posts: 216

PostPosted: Sat Jul 29, 2006 5:08 pm    Post subject: Reply with quote

a new bug has been found if you use hostinfo plugin

http://gilles.boulon.free.fr/rrdclean/rrdclean-1.2-modified.zip
Back to top
Display posts from previous:   
Post new topic   Reply to topic    Cacti Forum Index -> Plugin Announcements All times are GMT - 5 Hours
Goto page Previous  1, 2, 3, 4, 5, 6, 7, 8, 9, 10  Next
Page 4 of 10

 



Powered by phpBB © 2001, 2005 phpBB Group