Hey Gandalf,
Questions for you around RRDClean. I was actually thinking about doing something similar until I stumbled upon your plugin.
I am playing around with this on our busiest Cacti server. There are a whole bunch of false positives being displayed (rrd files that are bound to a data source and that have been updated within the past 20 minutes). So, how do you determine if RRDCleaner should flag an rrd file? Thanks.
On a side note- it may be a fun addition to the plugin to add some filters. For instance, only display rrd files that haven't been updated in X days, only display rrd's that have no datasource associated with them, etc.
I look forward to hearing from you- I like talking Cacti with you!
Lastly, couldn't this plugin's functionality technically be part of core Cacti? It could apply when you delete a graph. Right now, you can choose to create graph + data source. I understand that you don't want to delete the RRD file if another datasource is utilizing it. Couldn't Cacti, by default, give an option to remove the RRD file if no other datasource is bound to it? It seems that this is a pretty basic functionality that should be part of the core.
The plugin would still be needed to clean up the cases where you didn't opt to delete the graph- but it would be needed significantly less.
RRDClean- Some questions about how it determines stale RRD's
Moderators: Developers, Moderators
-
- Cacti User
- Posts: 62
- Joined: Fri Sep 23, 2011 2:48 pm
- gandalf
- Developer
- Posts: 22383
- Joined: Thu Dec 02, 2004 2:46 am
- Location: Muenster, Germany
- Contact:
Re: RRDClean- Some questions about how it determines stale R
It is known, that e.g. externally updates rrd files won't be handled correctly.
Sometimes, I even find "false positives" in our installation. I tried to find issues for the last ones, following them through polling to data templates ... And each of those "false positives" where a result of data queries with changing indices which had to be cleaned.
Personally, I suppose we need better logic on re-indexing. Some of this has already been included into Cacti (to detect reindexing for more triggers). But we e.g. do NOT disable data sources even in case the related index has gone. Those "orphans" will cause issues.
I'm open to a discussion about including rrdclean into core. This has been requested already years ago ...
But we may simply go with providing rrdclean along with the base tar.gz until then.
R.
Sometimes, I even find "false positives" in our installation. I tried to find issues for the last ones, following them through polling to data templates ... And each of those "false positives" where a result of data queries with changing indices which had to be cleaned.
Personally, I suppose we need better logic on re-indexing. Some of this has already been included into Cacti (to detect reindexing for more triggers). But we e.g. do NOT disable data sources even in case the related index has gone. Those "orphans" will cause issues.
I'm open to a discussion about including rrdclean into core. This has been requested already years ago ...
But we may simply go with providing rrdclean along with the base tar.gz until then.
R.
-
- Cacti User
- Posts: 62
- Joined: Fri Sep 23, 2011 2:48 pm
Re: RRDClean- Some questions about how it determines stale R
In our situation, none of our RRD files are externally updated.
I modified the plugin a tad to add a checkbox that filters the results to only show results where the datasource doesn't exist in Cacti. I thought this would be pretty handy.
After my recent posts, I think you would guess that I agree that the method of reindexing is flawed (data queries easily get garbled).
In regards to adding it to the core- I feel that it makes the most sense. I have to guess that for most people there is no utility in keeping an RRD file if no graph is utilizing it. When we delete our graphs, either they are broken, not needed, or the host was decommissioned. It feels only natural that in deleting the graph you also delete the storage. I feel cacti should just tack on the option to delete the rrd file when you delete the graph. Would there be any downfall of doing this? It seems odd to me that, by default, cacti leaves all rrd files on the disk. I cleared around a hundred gigs of old rrd's from one of our production servers. I'm sure across all of our servers there are much more than that.
I modified the plugin a tad to add a checkbox that filters the results to only show results where the datasource doesn't exist in Cacti. I thought this would be pretty handy.
After my recent posts, I think you would guess that I agree that the method of reindexing is flawed (data queries easily get garbled).
In regards to adding it to the core- I feel that it makes the most sense. I have to guess that for most people there is no utility in keeping an RRD file if no graph is utilizing it. When we delete our graphs, either they are broken, not needed, or the host was decommissioned. It feels only natural that in deleting the graph you also delete the storage. I feel cacti should just tack on the option to delete the rrd file when you delete the graph. Would there be any downfall of doing this? It seems odd to me that, by default, cacti leaves all rrd files on the disk. I cleared around a hundred gigs of old rrd's from one of our production servers. I'm sure across all of our servers there are much more than that.
- gandalf
- Developer
- Posts: 22383
- Joined: Thu Dec 02, 2004 2:46 am
- Location: Muenster, Germany
- Contact:
Re: RRDClean- Some questions about how it determines stale R
acceptedyousillygoose wrote:I modified the plugin a tad to add a checkbox that filters the results to only show results where the datasource doesn't exist in Cacti. I thought this would be pretty handy.
As already said, this will ALWAYS fail on externally updated data sources. But yes, that situation may get filtered out...Would there be any downfall of doing this?
Agreed. But again, providing the current plugin by default would make no difference comapring that to a core implementation. We still can argue, whether the cleanup should be automatic or manually triggered. Perhaps that would be the next useful configuration switch ...It seems odd to me that, by default, cacti leaves all rrd files on the disk.
R.
-
- Cacti User
- Posts: 62
- Joined: Fri Sep 23, 2011 2:48 pm
Re: RRDClean- Some questions about how it determines stale R
That would definitely be a useful configuration option. You can automate the rrdcleanup by a bunch of different filters:
*RRD file hasn't been updated in X days
*RRD file isn't bound to any datasource
*...possibly others?
I do like that option. I think you could even take it a step further. IE- automatically archive rrd files based on the filters above. Then, clean up any rrd that has been in the archive directory for X number of days. I find this useful just in case a valid rrdfile gets removed- if someone noticed it in say--1 month--it can be restored without losing the large amount of historical data.
*RRD file hasn't been updated in X days
*RRD file isn't bound to any datasource
*...possibly others?
I do like that option. I think you could even take it a step further. IE- automatically archive rrd files based on the filters above. Then, clean up any rrd that has been in the archive directory for X number of days. I find this useful just in case a valid rrdfile gets removed- if someone noticed it in say--1 month--it can be restored without losing the large amount of historical data.
- gandalf
- Developer
- Posts: 22383
- Joined: Thu Dec 02, 2004 2:46 am
- Location: Muenster, Germany
- Contact:
Re: RRDClean- Some questions about how it determines stale R
I will consider those hints when working on a next release of RRDCLEAN. But don't ask me for a release date
R.
R.
-
- Cacti User
- Posts: 62
- Joined: Fri Sep 23, 2011 2:48 pm
Re: RRDClean- Some questions about how it determines stale R
NO worries- I know you guys are busy .
Who is online
Users browsing this forum: No registered users and 2 guests