[ZBX-3394] There are still records (rows) in history and trend tables after deleting host and items Created: 2011 Jan 08 Updated: 2017 May 30 Resolved: 2011 Jan 08 |
|
Status: | Closed |
Project: | ZABBIX BUGS AND ISSUES |
Component/s: | None |
Affects Version/s: | 1.8.3 |
Fix Version/s: | 1.8.5 |
Type: | Incident report | Priority: | Critical |
Reporter: | nima | Assignee: | Unassigned |
Resolution: | Cannot Reproduce | Votes: | 0 |
Labels: | None | ||
Remaining Estimate: | Not Specified | ||
Time Spent: | Not Specified | ||
Original Estimate: | Not Specified | ||
Environment: |
Debian Lenny |
Description |
After deleted a bunch of hosts which were monitored at fast pace for a few years. it was expecting my 13GB Mysql DB to at least drop to less than 7GB, but it appears after the house keeper has run that the DB is the same size as before, and the history and trends table still have the same amount of records. |
Comments |
Comment by richlv [ 2011 Jan 08 ] |
housekeeper does not not delete all outdated records in one go by default. if that query returns something, it means housekeeper is not done yet |
Comment by Alexandre Fouche [ 2011 Jan 12 ] |
Well, yes, the housekeeper table had 8 records while there were millions of orphans in history_x and trends_x tables : I now have for example (Is the housekeeper working with zabbix 1.8.2?) zabbix=# select count zabbix=# select count zabbix=# select count Other tables also have millions of orphans. Note that these come from hosts monitored while we were running Zabbix 1.4.x, then migrated to 1.6.x years later, and then 1.8 and now 1.8.2 |
Comment by Alexandre Fouche [ 2011 Jan 12 ] |
In case it matters, i am using Centos 5.5 x86_64 |
Comment by richlv [ 2011 Jan 12 ] |
8 housekeeper records for millions of rows indeed sound a bit too low. which tables are listed in housekeeper tablename column ? if there's history or history_uint, does the value match any of the itemids in the corresponding table ? |
Comment by Alexandre Fouche [ 2011 Jan 18 ] |
Unfortunately, i do not have the content of the housekeeper table anymore. What i can give you at this time is the housekeeper log. I am not sure if that will help. I did not find any zabbix housekeeper fail, error or exception in zabbix_server.log As for the all the history* and trends* tables orphan records, i deleted them manually ( i did save them in table copies in case of ) Usual, with all the hosts, once per day : 13342:20101227:112024.736 Deleted 93773 records from history and trends Then, after the DB backup and restarting, about to delete many hosts ( i put the housekeeper every hour to see the cleaning at soon as possible, but the BIG cleaning did not happen ) 13314:20110104:025654.489 Syncing history data... As you can see, we just see the usual cleaning compared to before, not any big cleaning, Isn't there any tool or script or procedure to check the integrity of Zabbix DB and eleminate or fix all discrepencies or orphans ? |