rrdCleaner - cleans cactis rrd dir from unused rrd's

Announcements concerning Plugins for Cacti

Moderators: Developers, Moderators

Locked
User avatar
TheWitness
Developer
Posts: 17007
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

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
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
spignataro
Posts: 41
Joined: Mon Nov 07, 2005 11:21 pm

Post by spignataro »

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?
Tut`
Posts: 11
Joined: Thu Jul 21, 2005 7:39 am

Post by Tut` »

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

Last and final update.
Attachments
rrdclean.zip
(2.49 KiB) Downloaded 1529 times
spignataro
Posts: 41
Joined: Mon Nov 07, 2005 11:21 pm

Post by spignataro »

it works wonderfully now. Perfect :)

Thanks. I see where the problem was and thanks for the quick fix.
Tut`
Posts: 11
Joined: Thu Jul 21, 2005 7:39 am

Post by Tut` »

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".
spignataro
Posts: 41
Joined: Mon Nov 07, 2005 11:21 pm

Post by spignataro »

i know it is not perfect...but it is working alot better now.
aestevez
Posts: 2
Joined: Wed Nov 02, 2005 9:20 am

Better

Post by aestevez »

I was made some changes in order to the $files_unused = 0.
Attachments
rrdclean.zip
(2.71 KiB) Downloaded 1132 times
knobdy
Cacti User
Posts: 495
Joined: Wed Sep 28, 2005 1:39 pm

Post by knobdy »

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!
User avatar
TheWitness
Developer
Posts: 17007
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

Permissions.
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
knobdy
Cacti User
Posts: 495
Joined: Wed Sep 28, 2005 1:39 pm

Post by knobdy »

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...
User avatar
Pumpi
Cacti User
Posts: 259
Joined: Wed Jan 14, 2004 3:23 am
Location: Germany

Post by Pumpi »

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: Select all

Warning: Invalid argument supplied for foreach() in /srv/www/htdocs/cacti/plugins/rrdclean/rrdcleaner.php on line 38
  
but in general it works.
User avatar
gilles
Cacti User
Posts: 250
Joined: Tue Jul 12, 2005 8:16 pm

Post by gilles »

Attachments
bug
bug
bug.JPG (14.94 KiB) Viewed 24032 times
Last edited by gilles on Sat Jul 22, 2006 6:21 pm, edited 3 times in total.
User avatar
ScOp3
Cacti User
Posts: 61
Joined: Wed Aug 03, 2005 4:14 am
Location: Cologne Germany
Contact:

Post by ScOp3 »

gilles wrote:i have resolved a bug
Thanks!
fear leads to anger, anger leads to hate and dancing leads to sex!
bossi
Posts: 5
Joined: Fri May 19, 2006 4:49 pm

rrdcleaner

Post by bossi »

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?

':oops:'

Code: Select all

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
User avatar
gilles
Cacti User
Posts: 250
Joined: Tue Jul 12, 2005 8:16 pm

Post by gilles »

a new bug has been found if you use hostinfo plugin

http://gilles.boulon.free.fr/rrdclean/r ... dified.zip
Locked

Who is online

Users browsing this forum: No registered users and 1 guest