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  Next
 
Post new topic   Reply to topic    Cacti Forum Index -> Plugin Announcements
Author Message
gandalf
Developer


Joined: 02 Dec 2004
Posts: 12205
Location: Muenster, Germany

PostPosted: Thu Jan 17, 2008 7:59 am    Post subject: Reply with quote

Unfortunately, your log stops at the important step. The items before are from using the gui. I'm wondering, whether the cacti poller is running as root?
Reinhard
Back to top
timi
Cacti User


Joined: 09 Nov 2005
Posts: 124
Location: Timisoara, Romania

PostPosted: Thu Jan 17, 2008 5:03 pm    Post subject: Reply with quote

yes, the poller is running as root, exactly, for what should I look in the logs ?
Back to top
gandalf
Developer


Joined: 02 Dec 2004
Posts: 12205
Location: Muenster, Germany

PostPosted: Fri Jan 18, 2008 2:24 pm    Post subject: Reply with quote

Run the poller once on a clean log file in DEBUG mode and grep for RRDCLEAN. That catches everything
Reinhard
Back to top
torstentfk
Cacti User


Joined: 05 Apr 2005
Posts: 181
Location: Munich, Germany

PostPosted: Fri Jan 25, 2008 4:34 am    Post subject: Reply with quote

Hi,

made also a debug on the rrdcleaner code: which function is responsible for deleting the files from hard disk? Where is the call of this function?

You mentioned that oen sould NOT use the page-scroll-function because the "poller_delete_table" will be deleted. This is very dangerous for user who are accustomed on the page-number selection on the top of the list.
The reinitialisation of the todo-list table should only be at the end of a poller cyle not at every use of the rrdcleaner plugin page.

Torsten
Back to top
gandalf
Developer


Joined: 02 Dec 2004
Posts: 12205
Location: Muenster, Germany

PostPosted: Fri Jan 25, 2008 10:08 am    Post subject: Reply with quote

I use the poller_bottom hook. The function is defined in setup.php
Reinhard
Back to top
johnrembo
Cacti User


Joined: 24 Apr 2006
Posts: 198

PostPosted: Thu Feb 07, 2008 5:42 am    Post subject: Reply with quote

i got very suprprised after finding-out that rrdcleaner deletes unused rrd-files but leaves unused data-sources and graphs. That made a hudge mess i my cacti.
I wrote quick and dirty script which finds and removes unused(empty) data-sources and unavailable graphs.



garbage_cleaner.php.zip
 Description:

Download
 Filename:  garbage_cleaner.php.zip
 Filesize:  1.18 KB
 Downloaded:  128 Time(s)


garbage_cleaner.php.gz
 Description:

Download
 Filename:  garbage_cleaner.php.gz
 Filesize:  1.05 KB
 Downloaded:  121 Time(s)

Back to top
fmangeant
Cacti Guru User


Joined: 19 Sep 2003
Posts: 2325
Location: Sophia-Antipolis, France

PostPosted: Thu Feb 07, 2008 8:17 am    Post subject: Reply with quote

Hi

by "unused data-sources", do you mean data sources associated to the "None" host ?
Back to top
johnrembo
Cacti User


Joined: 24 Apr 2006
Posts: 198

PostPosted: Thu Feb 07, 2008 9:59 am    Post subject: Reply with quote

fmangeant wrote:
Hi

by "unused data-sources", do you mean data sources associated to the "None" host ?


no, I mean data-sources associated with rrd files that have been deleted.
Back to top
sizulku
Cacti User


Joined: 04 Nov 2002
Posts: 102
Location: ACEH

PostPosted: Thu Feb 07, 2008 11:43 am    Post subject: Reply with quote

sory..but how to use it? just copy it to cacti's root directory?
Back to top
apperrault
Cacti User


Joined: 16 Feb 2007
Posts: 351
Location: Emeryville, CA

PostPosted: Thu Feb 07, 2008 11:55 am    Post subject: Reply with quote

in looking through the PHP file, it looks to be a new plugin. i havent had a chance to test it out though.

app
Back to top
johnrembo
Cacti User


Joined: 24 Apr 2006
Posts: 198

PostPosted: Fri Feb 08, 2008 2:39 am    Post subject: Reply with quote

sizulku wrote:
sory..but how to use it? just copy it to cacti's root directory?


yup...just like that...
ps: make backup of cacti's database before just in case something goes wrong. It should display($debug=true) what data-sources and local_graph_id's were removed.
Back to top
johnrembo
Cacti User


Joined: 24 Apr 2006
Posts: 198

PostPosted: Fri Feb 08, 2008 2:47 am    Post subject: Reply with quote

apperrault wrote:
in looking through the PHP file, it looks to be a new plugin. i havent had a chance to test it out though.
app


i had such an idea to write a small and simple plugin. but, it is my conviction that rrdcleaner should do that. So, maybe, instead, it would be better to implemet this small code to rrdcleaner itself?
Alternative would be tuning this thing a little bit and the puttingit to cactis "cli" folder.
Back to top
gandalf
Developer


Joined: 02 Dec 2004
Posts: 12205
Location: Muenster, Germany

PostPosted: Fri Feb 08, 2008 8:39 am    Post subject: Reply with quote

johnrembo wrote:
apperrault wrote:
in looking through the PHP file, it looks to be a new plugin. i havent had a chance to test it out though.
app


i had such an idea to write a small and simple plugin. but, it is my conviction that rrdcleaner should do that. So, maybe, instead, it would be better to implemet this small code to rrdcleaner itself?
Alternative would be tuning this thing a little bit and the puttingit to cactis "cli" folder.
I'd like to integrate this function into the next release. Due to pressing work that has to be completed for 088, I will tackle other issues first this weekend. If time (and my wife) permits, I will create a new rrdcleaner version, then.
Reinhard
Back to top
johnrembo
Cacti User


Joined: 24 Apr 2006
Posts: 198

PostPosted: Fri Feb 08, 2008 10:00 am    Post subject: Reply with quote

gandalf wrote:

I'd like to integrate this function into the next release. Due to pressing work that has to be completed for 088, I will tackle other issues first this weekend. If time (and my wife) permits, I will create a new rrdcleaner version, then.
Reinhard


thnx. we'll be waiting for it...
Back to top
gandalf
Developer


Joined: 02 Dec 2004
Posts: 12205
Location: Muenster, Germany

PostPosted: Fri Feb 22, 2008 2:10 pm    Post subject: Reply with quote

I've got it fixed. But I want to wait 'til the new PIA 2.0 interface is out (read: documented) to make it work in clean 087b environments.
Reinhard
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  Next
Page 8 of 9

 



Powered by phpBB © 2001, 2005 phpBB Group