Hi all - these syslog mysql files are blowing up my disk space - can someone recommend how to purge/shrink them back down?
[root@cacti-03 syslog]# du -skh *
8.0K db.opt
16K syslog_alert.frm
0 syslog_alert.MYD
8.0K syslog_alert.MYI
16K syslog.frm
16K syslog_incoming.frm
1.3G syslog_incoming.MYD
202M syslog_incoming.MYI
1.2G syslog.MYD
399M syslog.MYI
16K syslog_remove.frm
0 syslog_remove.MYD
8.0K syslog_remove.MYI
16K syslog_reports.frm
0 syslog_reports.MYD
8.0K syslog_reports.MYI
thanks
http://vmadmin.info
mysql syslog how to purge/shrink?
Moderators: Developers, Moderators
- TheWitness
- Developer
- Posts: 17059
- Joined: Tue May 14, 2002 5:08 pm
- Location: MI, USA
- Contact:
Re: mysql syslog how to purge/shrink?
Well, it looks like the Syslog plugin has hosed you. If you are running a very old Syslog Plugin Version, you should consider getting 1.22 from SVN. However, before that, you can remove the Syslog Incoming table (1.3G) by simply running the following below:
If you don't mind loosing the Syslog data, then run the following:
The new Syslog does a better job at managing the table sizes. So, that will get you out of a jam. However, if you really want to get out of a jam, do the step from above, upgrade to MySQL 5.1/5.5 (Insure Strict Mode is Off), and then reinstall Syslog 1.22, at which time you can go with partitioned tables which will allow Cacti to perform well without I/O issues that led to this.
TheWitness
Code: Select all
msyql -e "truncate syslog_incoming" syslog
Code: Select all
msyql -e "truncate syslog" syslog
TheWitness
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?
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?
Re: mysql syslog how to purge/shrink?
Worked like a charm!
thanks Witness,
Fletch.
thanks Witness,
Fletch.
Re: mysql syslog how to purge/shrink?
I'm having a bit the same issue.
The syslog db is filling up bigtime. After one day, about 100MB?
Of course, this can be normal, since a lot of logs are generated by the server.
But is there a way to limit this?
The syslog db is filling up bigtime. After one day, about 100MB?
Of course, this can be normal, since a lot of logs are generated by the server.
But is there a way to limit this?
- For example overwrite once it hits 1GB?
- Or is it possible to truncate all data from fe 'before last 7 days'?
Cacti: 0.8.7i PIA on Ubuntu (linuxmce) with NET-SNMP 5.4.1 / RRDTool 1.2.x
Plugins: Manage062, Syslog122, Mactrack29, Settings071, Weathermap097a, Quicktree02, Thold049, Configmanager0826, Aggregate070, Realtime043, Nettools015
Private use: 24 hosts (and trying to integrate it into linuxmce)
Professional use 1635 nodes with 3616 graphs (backup / syslog / weathermaps...)
Plugins: Manage062, Syslog122, Mactrack29, Settings071, Weathermap097a, Quicktree02, Thold049, Configmanager0826, Aggregate070, Realtime043, Nettools015
Private use: 24 hosts (and trying to integrate it into linuxmce)
Professional use 1635 nodes with 3616 graphs (backup / syslog / weathermaps...)
Who is online
Users browsing this forum: No registered users and 2 guests