ZABBIX Forums  
  #1  
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.

Code:
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
  #2  
Old 22-08-2006, 01:44
edeus edeus is offline
Senior Member
 
Join Date: Aug 2005
Posts: 121
Default

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
  #3  
Old 22-08-2006, 07:53
Alexei Alexei is offline
Zabbix developer, product manager
 
Join Date: Sep 2004
Location: Riga, Latvia
Posts: 5,615
Lightbulb

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
  #4  
Old 30-08-2006, 11:14
korgano korgano is offline
Junior Member
 
Join Date: Apr 2006
Posts: 7
Default ibdata1 size huge

Hi,

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?

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

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:
http://bugs.mysql.com/bug.php?id=1341

some instructions:
http://dev.mysql.com/doc/refman/5.0/...-removing.html
Reply With Quote
Reply

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 08:14.