rrdCleaner - cleans cactis rrd dir from unused rrd's
Moderators: Developers, Moderators
- fmangeant
- Cacti Guru User
- Posts: 2345
- Joined: Fri Sep 19, 2003 8:36 am
- Location: Sophia-Antipolis, France
- Contact:
Many many thanks gilles for this plugin
[size=84]
[color=green]HOWTOs[/color] :
[list][*][url=http://forums.cacti.net/viewtopic.php?t=15353]Install and configure the Net-SNMP agent for Unix[/url]
[*][url=http://forums.cacti.net/viewtopic.php?t=26151]Install and configure the Net-SNMP agent for Windows[/url]
[*][url=http://forums.cacti.net/viewtopic.php?t=28175]Graph multiple servers using an SNMP proxy[/url][/list]
[color=green]Templates[/color] :
[list][*][url=http://forums.cacti.net/viewtopic.php?t=15412]Multiple CPU usage for Linux[/url]
[*][url=http://forums.cacti.net/viewtopic.php?p=125152]Memory & swap usage for Unix[/url][/list][/size]
[color=green]HOWTOs[/color] :
[list][*][url=http://forums.cacti.net/viewtopic.php?t=15353]Install and configure the Net-SNMP agent for Unix[/url]
[*][url=http://forums.cacti.net/viewtopic.php?t=26151]Install and configure the Net-SNMP agent for Windows[/url]
[*][url=http://forums.cacti.net/viewtopic.php?t=28175]Graph multiple servers using an SNMP proxy[/url][/list]
[color=green]Templates[/color] :
[list][*][url=http://forums.cacti.net/viewtopic.php?t=15412]Multiple CPU usage for Linux[/url]
[*][url=http://forums.cacti.net/viewtopic.php?p=125152]Memory & swap usage for Unix[/url][/list][/size]
Hi,
I installed rrdcleaner.
The plugin checks unused rrd files correctly.
But when I try to delete, I get this message:
How can I fix it?
Here is the permission of rrd file :
I installed rrdcleaner.
The plugin checks unused rrd files correctly.
But when I try to delete, I get this message:
I think this is about permission problem.aggregator_maltepe_traffic_in_816.rrd Error : unable to delete!
How can I fix it?
Here is the permission of rrd file :
And in crontab, poller.php runs with root user:[root@citizen rra]# ls -la agg*816*
-rw-r--r-- 1 nobody nobody 945944 Mar 2 2006 aggregator_maltepe_traffic_in_816.rrd
Is there any information needed to solve the problem?*/5 * * * * root /usr/bin/php /var/www/html/cacti/poller.php > /dev/null 2>&1
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 ...
-------------------------------------------------
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 ...
cacti 0.8.6i | cmd.php / Plugin arch + Thold
mysql 5.0.18 | net-snmp 5.1.2-11 | rrdtool 1.2.13 | apache 2.2.0 | php 5.1.4 | RH4EL
mysql 5.0.18 | net-snmp 5.1.2-11 | rrdtool 1.2.13 | apache 2.2.0 | php 5.1.4 | RH4EL
-
- Posts: 17
- Joined: Wed Jul 12, 2006 11:25 pm
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.
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.
-
- Posts: 17
- Joined: Wed Jul 12, 2006 11:25 pm
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.
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.
- Attachments
-
- Screenshot
- screenshot.jpg (90.99 KiB) Viewed 10718 times
- gandalf
- Developer
- Posts: 22383
- Joined: Thu Dec 02, 2004 2:46 am
- Location: Muenster, Germany
- Contact:
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
Reinhard
-
- Cacti User
- Posts: 50
- Joined: Sun Apr 01, 2007 12:47 am
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.
- gandalf
- Developer
- Posts: 22383
- Joined: Thu Dec 02, 2004 2:46 am
- Location: Muenster, Germany
- Contact:
Please find the new version of RRDCleaner, V0.3, attached. From README:
Reinhard
Code: Select all
/*******************************************************************************
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 ---
- Attachments
-
- A screenshot.
Please notice the filter function.
The last line holds a grand total of all files matching the current filter. - rrdcleaner.png (91.64 KiB) Viewed 9338 times
- A screenshot.
Last edited by gandalf on Sun Oct 21, 2007 2:54 am, edited 2 times in total.
-
- Cacti User
- Posts: 379
- Joined: Fri Feb 16, 2007 11:37 am
- Location: Emeryville, CA
- Contact:
Gandolf,
i get the following message after installing the most recent version.
please let me know how to proceed. i get this at the top of the rrdclean page.
app
i get the following message after installing the most recent version.
Code: Select all
Notice: Undefined index: rrdcleaner.php:restart in E:\cacti\lib\functions.php on line 1422
app
[b]Cacti Version[/b] - 0.8.7b
[b]Plugin Architecture[/b] - 2.2 Beta
[b]Poller Type[/b] - CMD.php
[b]Server Info[/b] - Linux 2.6.9-78.0.1.ELsmp
[b]Web Server[/b] - Apache/2.0.52 (Red Hat)
[b]PHP[/b] - 4.3.9
[b]MySQL[/b] - 4.1.22
[b]RRDTool[/b] - 1.2.23
[b]SNMP[/b] - 5.1.2
[b]Plugins[/b][list]Global Plugin Settings (settings - v0.5)
SuperLinks (superlinks - v0.72)
Host Info (hostinfo - v0.2)
Report Creator (reports - v0.3)
Update Checker (update - v0.4)
Realtime for Cacti (realtime - v0.35)
Cacti Log View (clog - v1.1)
RRD File Cleaner (rrdclean - v0.36)
Network Discovery (discovery - v0.9)
Uptime (uptime - v0.4)[/list]
[b]Plugin Architecture[/b] - 2.2 Beta
[b]Poller Type[/b] - CMD.php
[b]Server Info[/b] - Linux 2.6.9-78.0.1.ELsmp
[b]Web Server[/b] - Apache/2.0.52 (Red Hat)
[b]PHP[/b] - 4.3.9
[b]MySQL[/b] - 4.1.22
[b]RRDTool[/b] - 1.2.23
[b]SNMP[/b] - 5.1.2
[b]Plugins[/b][list]Global Plugin Settings (settings - v0.5)
SuperLinks (superlinks - v0.72)
Host Info (hostinfo - v0.2)
Report Creator (reports - v0.3)
Update Checker (update - v0.4)
Realtime for Cacti (realtime - v0.35)
Cacti Log View (clog - v1.1)
RRD File Cleaner (rrdclean - v0.36)
Network Discovery (discovery - v0.9)
Uptime (uptime - v0.4)[/list]
- gandalf
- Developer
- Posts: 22383
- Joined: Thu Dec 02, 2004 2:46 am
- Location: Muenster, Germany
- Contact:
Sorry for that missing line. New Code attached, only removed this error.
Reinhard
Reinhard
- Attachments
-
- rrdclean-031.tgz
- Updated Code
- (6.85 KiB) Downloaded 490 times
Who is online
Users browsing this forum: No registered users and 0 guests