[ZBX-4298] No messages in the LEVEL_WARNING log about deleted values by housekeeper (table "housekeeper") Created: 2011 Oct 31 Updated: 2017 May 30 Resolved: 2011 Dec 19 |
|
Status: | Closed |
Project: | ZABBIX BUGS AND ISSUES |
Component/s: | Server (S) |
Affects Version/s: | 1.8.8 |
Fix Version/s: | 1.8.10, 1.8.11, 1.9.9 (beta) |
Type: | Incident report | Priority: | Minor |
Reporter: | Oleksii Zagorskyi | Assignee: | Unassigned |
Resolution: | Fixed | Votes: | 0 |
Labels: | housekeeper | ||
Remaining Estimate: | Not Specified | ||
Time Spent: | Not Specified | ||
Original Estimate: | Not Specified | ||
Environment: |
DebugLevel=3 |
Description |
When zabbix_server works with the DebugLevel=3 it reports to the log this message: But here are not included values deleted by housekeeper for the items already deleted from configuration (table "housekeeper"). Try to imagine a situation when some user has performed "Unlink and clear" action with some big template linked to the several hosts and in the nearest hour he felt some problem with the DB performance and he thinks - what happened ? Here is part of DebugLevel=4 (I added several EOL for better view): 15500:20111031:150250.029 End of housekeeping_history_and_trends():0 15500:20111031:150250.029 Deleted 0 records from history and trends 15500:20111031:150250.029 In housekeeping_process_log() 15500:20111031:150250.029 query [txnlev:0] [delete from history where itemid=22578 limit 100] 15500:20111031:150250.044 query without transaction detected 15500:20111031:150250.044 query [txnlev:0] [delete from history_uint where itemid=22577 limit 100] 15500:20111031:150250.060 End of housekeeping_process_log():SUCCEED 15500:20111031:150250.060 In housekeeping_alerts() now:1320062561 15500:20111031:150250.060 In housekeeping_sessions() now:1320062561 (in this example "MaxHousekeeperDelete=100") As you see in the function "housekeeping_process_log()", where the values are deleted from the tables history, history_uint (and not only), no messages are added for the LOG_LEVEL_WARNING. I ask to add these messages to log. Maybe individually per each table, maybe summarize history+trends, I don't know how is better. If any such values were not deleted then needn't to report any messages. |
Comments |
Comment by Oleksii Zagorskyi [ 2011 Oct 31 ] |
(1) By the way, the name of function "housekeeping_process_log()" seems is not optimal. I suggest to change it to "housekeeping_process_deleted_items()" or similar. <dimir> I chose housekeeping_cleanup(), RESOLVED in r23553 <zalex> Excellent ! CLOSED |
Comment by dimir [ 2011 Nov 25 ] |
Fixed in development branch svn://svn.zabbix.com/branches/dev/ZBX-4298 |
Comment by dimir [ 2011 Nov 25 ] |
I've chosen "housekeeping_cleanup()", if nobody minds. So the report will look like this: 11921:20111125:180134.824 housekeeper deleted 0 records from history and trends, 28561 records of deleted items, 0 events, 0 alerts and 0 sessions This will be logged on every housekeeper step even if nothing was removed. Agreed with sasha that this way there will will be no questions whether it actually was or not an attempt to delete the data. |
Comment by Oleksii Zagorskyi [ 2011 Nov 27 ] |
Dev branch tested. Works as expected. Single line for report is very-very good. (2) I would suggest to write that line as: <dimir> RESOLVED in r23560 <zalex> Many thanks. CLOSED. |
Comment by dimir [ 2011 Nov 30 ] |
Fixed in pre-1.8.10 r23632, pre-1.9.9 r23633. |
Comment by Alexander Vladishev [ 2011 Nov 30 ] |
(1) Broken compilation of the latest trunk. housekeeper.c: In function ‘housekeeping_cleanup’: <dimir> sorry for the broken trunk, RESOLVED in r23663 directly in trunk <zalex> tested. trunk r23663 compiled ok and it works. <sasha> CLOSED with small change in r23688. |
Comment by richlv [ 2011 Nov 30 ] |
(2) also : <dimir> "Old history and trends" is the outdated information (as configured in the item keep this and that), "records of deleted items" is all the data (basically what's in "housekeeper" table) related to removed item. <zalex> maybe would be better to replace all words "records" to the "values"? It will be more clear. <dimir> For me "deleted 2 values from history and trends" is not more clear than "deleted 2 records from hostory and trends". What I'd add is singular value support. <dimir> if there are no objections, RESOLVED in r23681 <zalex> dev branch r23681 tested. it works (see 1 event): <dimir> We decided to discard these changes as we don't have anything like it anywhere. CLOSED |
Comment by dimir [ 2011 Dec 01 ] |
Oleksiy, thank you for testing! |
Comment by dimir [ 2011 Dec 01 ] |
Fixed in trunk r23663. |
Comment by richlv [ 2011 Dec 01 ] |
(3) i suspect "d_clenup" is a typo <dimir> Right, RESOLVED in pre-1.8.10 r23732, pre-1.9.9 r23733. |
Comment by Alexander Vladishev [ 2011 Dec 02 ] |
Closing resolved issue |
Comment by dimir [ 2011 Dec 02 ] |
Reopening to assign to myself. |
Comment by dimir [ 2011 Dec 02 ] |
Closed. |
Comment by richlv [ 2011 Dec 19 ] |
48 deleted events reported as 1 in 1.8.10rc1 strace output : event_strace.13938:write(6, "$\0\0\0\3delete from events where eventid=11", 40) = 40 |
Comment by Alexander Vladishev [ 2011 Dec 19 ] |
Fixed in the development branch svn://svn.zabbix.com/branches/dev/ZBX-4298 |
Comment by dimir [ 2011 Dec 19 ] |
Tested successfully. |
Comment by Alexander Vladishev [ 2011 Dec 28 ] |
Available in version pre-1.8.11, r24309. |