PDA

View Full Version : Database clean up


darveesh
24-06-2005, 16:35
Is there a script to clean up the received data values? I don't wish to remove the hosts or the items or the triggers or the actions.

But any received values, alarms, trends, etc. are fair game.

If no script exists, can you point to the tables I can safely truncate?

Thanks.

Alex.

matboy
28-06-2005, 12:03
Would be nice indeed :)

jldash
29-06-2005, 17:56
I'd like to accomplish the same thing.
Can I just truncate all the tables that the manual describes as containing 'History' ?

darveesh
30-06-2005, 02:43
I truncated the following tables that are somehow history related:

ALARMS
ALERTS
HISTORY
HISTORY_STR
SERVICE_ALARMS
TRENDS


history is/can be a MASSIVE table. So watch out. Truncating in mysql on a intel P3 took 2 hours for 8 million records.

Afterwards, zabbix pages (php) were very slow. Maybe zabbix_suckerd was doing something/recovering from the "blow"... but eventually it normalized...

festivalman
30-06-2005, 21:23
Sounds great. Question though. I've got a 15 gigs db at this point that I'm going to truncate the history for. Do I need to do any other commands after this for the ibdata1 mysql file to shrink or will it happen automatically?

Alexei
30-06-2005, 22:28
Sounds great. Question though. I've got a 15 gigs db at this point that I'm going to truncate the history for. Do I need to do any other commands after this for the ibdata1 mysql file to shrink or will it happen automatically? As far as I know, InnoDB doesn't shrink database spaces automatically even if there is no data.

riegersteve
01-07-2005, 14:12
and on that note, why must this be InnoDb can you make it Isam