ZABBIX Forums  
Old 12-07-2006, 18:38
Zabbixazzer Zabbixazzer is offline
Junior Member
Join Date: Jul 2006
Posts: 14
Default cleaning database

I use the following commands to clean zabbix 1.1 database, and it seems to work.

TRUNCATE TABLE zabbix.acknowledges;
TRUNCATE TABLE zabbix.alarms;
TRUNCATE TABLE zabbix.alerts;
TRUNCATE TABLE zabbix.auditlog;
TRUNCATE TABLE zabbix.escalation_log;
TRUNCATE TABLE zabbix.history;
TRUNCATE TABLE zabbix.history_log;
TRUNCATE TABLE zabbix.history_str;
TRUNCATE TABLE zabbix.history_text;
TRUNCATE TABLE zabbix.history_uint;
TRUNCATE TABLE zabbix.service_alarms;
TRUNCATE TABLE zabbix.stats;
TRUNCATE TABLE zabbix.trends;
please anybody tell me if there is something wrong!!
Reply With Quote
Old 22-08-2006, 01:44
edeus edeus is offline
Senior Member
Join Date: Aug 2005
Posts: 121

Is there any way to clean the database by selecting item types?

It would be really useful to be able to set certain item's to never be cleaned, whereas 75% of my history table really needs cleaning.
Reply With Quote
Old 22-08-2006, 07:53
Alexei Alexei is offline
Zabbix developer, product manager
Join Date: Sep 2004
Location: Riga, Latvia
Posts: 5,639

ZABBIX 1.1 and ZABBIX 1.1.1 are both affected by a quite serious problem - they do not correctly perform housekeeping. It basically means that housekeeper does not delete outdated data as it should do. Please wait for 1.1.2.
Alexei Vladishev
Creator of Zabbix, Product manager
New York | Tokyo | Riga
My Twitter
Reply With Quote
Old 30-08-2006, 11:14
korgano korgano is offline
Junior Member
Join Date: Apr 2006
Posts: 7
Default ibdata1 size huge


my ibdata1-file got 4GB big in size. Now I have truncated the history-table to cleanup, but ibdata1 keeps at the same size (phpmyadmin shows "InnoDB free: 4171776 kB").

Since I am not familiar with innodb, I can only guess that innodb allocates disk space once, extending automatically, but not "contracting" automatically.

Is there a way, I can tell innodb to free that disk space not used?

Reply With Quote
Old 29-09-2006, 11:47
Godzilla Godzilla is offline
Junior Member
Join Date: Aug 2005
Posts: 24

basically I read that it cannot shrink.
You need to back up the data, remove the file, create a new one, and restore.
(You may want to do some more investigating also.)

"It doesn't shrink" bug:

some instructions:
Reply With Quote

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT +2. The time now is 07:08.