how to empty old graphs from mysql?
Moderators: Developers, Moderators
how to empty old graphs from mysql?
Peace, I have searched the forums to know how to free disk space but I am unable to find a script in the cli directory that empties rra's. my cacti version is 0.8.8f.
any help on this?
any help on this?
Seek and you shall find, knock and it shall be opened, cry and you will find comfort, thirst and you shall be watered.
Re: how to empty old graphs from mysql?
Take this plugin
Rrdclean
it will do the job safely
Rrdclean
it will do the job safely
Test
Almalinux
php 8.2.14
mariadb 10.6.16
Cacti 1.2.27
Spine 1.2.27
RRD 1.7.2
thold 1.8
monitor 2.5
syslog 3.2
flowview: 3.3
weathermap 1.0 Beta
Almalinux
php 8.2.14
mariadb 10.6.16
Cacti 1.2.27
Spine 1.2.27
RRD 1.7.2
thold 1.8
monitor 2.5
syslog 3.2
flowview: 3.3
weathermap 1.0 Beta
Re: how to empty old graphs from mysql?
ok, i installed it. how to use it?
Seek and you shall find, knock and it shall be opened, cry and you will find comfort, thirst and you shall be watered.
Re: how to empty old graphs from mysql?
Just go to console -> setting -> misc and enter your backup and archive directory
Than go to console -> RRDCleaner -> rescan, and it wil list all the RRD file not used anymore.
Than you can delete, backup or archive it.
Than go to console -> RRDCleaner -> rescan, and it wil list all the RRD file not used anymore.
Than you can delete, backup or archive it.
Test
Almalinux
php 8.2.14
mariadb 10.6.16
Cacti 1.2.27
Spine 1.2.27
RRD 1.7.2
thold 1.8
monitor 2.5
syslog 3.2
flowview: 3.3
weathermap 1.0 Beta
Almalinux
php 8.2.14
mariadb 10.6.16
Cacti 1.2.27
Spine 1.2.27
RRD 1.7.2
thold 1.8
monitor 2.5
syslog 3.2
flowview: 3.3
weathermap 1.0 Beta
Re: how to empty old graphs from mysql?
i scaned, the result was 2 unused rrd files. That's not gonna empty a 1 MB. I need a way to empty old data in the database to purge old graphs so that disk space is freed.
Thanks for the help!
Thanks for the help!
Seek and you shall find, knock and it shall be opened, cry and you will find comfort, thirst and you shall be watered.
- phalek
- Developer
- Posts: 2838
- Joined: Thu Jan 31, 2008 6:39 am
- Location: Kressbronn, Germany
- Contact:
Re: how to empty old graphs from mysql?
Just to clarify: RRD files are created once with a fixed size. The size of the rrd file is defined by the RRA definitions. Deleting data from the rrd files will not reduce their size.
Greetings,
Phalek
---
Need more help ? Read the Cacti documentation or my new Cacti 1.x Book
Need on-site support ? Look here Cacti Workshop
Need professional Cacti support ? Look here CereusService
---
Plugins : CereusReporting
Phalek
---
Need more help ? Read the Cacti documentation or my new Cacti 1.x Book
Need on-site support ? Look here Cacti Workshop
Need professional Cacti support ? Look here CereusService
---
Plugins : CereusReporting
Re: how to empty old graphs from mysql?
I'm sure this is a wide spread problem, does anybody have a solution to this ?
Seek and you shall find, knock and it shall be opened, cry and you will find comfort, thirst and you shall be watered.
Re: how to empty old graphs from mysql?
This isn't a wide spread problem, as the rrds don't grow in size, they are always the same. If you are wanting to clear up disk space, then you might want to start by looking at log files, etc...
Re: how to empty old graphs from mysql?
i deleted the logs, but that only freed about 2 GB, do you mean after more than a year of graphing the mysql database is not hogged with graphs?
Seek and you shall find, knock and it shall be opened, cry and you will find comfort, thirst and you shall be watered.
Re: how to empty old graphs from mysql?
The graph data is not stored in MySQL, its stored in those rrd files. The files are created full size, and they will never grow larger than they currently are. When the retention period is up on the data, it is automatically overridden by the new data.
Re: how to empty old graphs from mysql?
Thanks for the reply. How much is the retention period?
Seek and you shall find, knock and it shall be opened, cry and you will find comfort, thirst and you shall be watered.
Re: how to empty old graphs from mysql?
You have to look in Cacti at the RRAs you have set. That tells it the retention, etc.. (basically how much data to store and how often to expect it). Then for each data template, you select those RRAs and the consolidation functions. So basically each rrd file can be completely different based upon the data template and rras selected.
Re: how to empty old graphs from mysql?
Peace, free space was 22% now it's 20% more than a week later. It means the rra's are still growing. I left the rra's at their default, what to set the value to and where in order to delete older data?
Seek and you shall find, knock and it shall be opened, cry and you will find comfort, thirst and you shall be watered.
Re: how to empty old graphs from mysql?
It doesn't mean that the RRDs are growing, they can't. It most likely means that log files or something else are growing.
Re: how to empty old graphs from mysql?
The apache and the cacti and the messages log files grew a bit but there is something else growing and they are now in megabytes but i've reached 20% again, and thanks for the answer.what could it be if not the growing of files with time passing by?
Seek and you shall find, knock and it shall be opened, cry and you will find comfort, thirst and you shall be watered.
Who is online
Users browsing this forum: No registered users and 0 guests