[ZBX-5778] Hosts in Maintenance mode ('no data collection') are counted (but shouldn't) in Queue of items to be updated Created: 2012 Oct 31  Updated: 2017 May 30  Resolved: 2014 Mar 05

Status: Closed
Project: ZABBIX BUGS AND ISSUES
Component/s: Frontend (F), Server (S)
Affects Version/s: 2.0.3
Fix Version/s: 2.0.12rc1, 2.2.3rc1, 2.3.0

Type: Incident report Priority: Minor
Reporter: Olgierd Wolodkiewicz Assignee: Unassigned
Resolution: Fixed Votes: 3
Labels: maintenance, queue
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

RHEL + Oracle g11r2


Issue Links:
Duplicate
is duplicated by ZBX-6053 queue length growth for uncollected i... Closed

 Description   

We use Maintenance mode extensively.

Hosts in Maintenance mode WITHOUT data collection shouldn't be considered to have updated items.



 Comments   
Comment by Olgierd Wolodkiewicz [ 2013 Jan 04 ]

PLEASE, fix this.
If you don't know what I meant in description I can elaborate anytime.
Simply if host is set to Maintenance Mode (no data collection) items of this host shouldn't be considered as waiting for update in queue. It simply means that current Zabbix code (2.0.4) counts such hosts and items as waiting for update in queue infinitely.

Comment by Igors Homjakovs (Inactive) [ 2014 Feb 21 ]

Fixed in svn://svn.zabbix.com/branches/dev/ZBX-5778-2.0

Comment by Igors Homjakovs (Inactive) [ 2014 Feb 21 ]

(1) Frontend side has to be fixed.

asaveljevs RESOLVED in r42926.

igorsh Thank you. CLOSED.

Comment by Aleksandrs Saveljevs [ 2014 Feb 24 ]

(2) Version 2.2 is also affected: active agent items are counted in the queue.

igorsh Fixed in svn://svn.zabbix.com/branches/dev/ZBX-5778-2.2

RESOLVED in r43058.

asaveljevs CLOSED

Comment by richlv [ 2014 Mar 03 ]

to clarify, all this only affects nodata maintenance - outside such maintenance active items etc would still be included in the queue

Comment by Aleksandrs Saveljevs [ 2014 Mar 03 ]

(3) In DCget_item_queue() function of Zabbix 2.2, there is the following code:

if (0 != (item->flags & (ZBX_FLAG_DISCOVERY_RULE | ZBX_FLAG_DISCOVERY_PROTOTYPE)))
	continue;

This seems to be a bug and sasha confirms.

First, discovery rules should not be excluded from queue calculation - they are processed just like any other regular item.

Second, item prototypes should not be stored in configuration cache. It has to be checked whether we actually store them and remove them if so. Once done, the condition is unnecessary.

igorsh RESOLVED in r43142.

asaveljevs Simply removing the condition is not correct, because item prototypes are stored in the configuration cache. It can only be removed fully once item prototypes are removed from configuration cache. REOPENED.

igorsh RESOLVED in r43182.

asaveljevs r43182 seems to select only prototype items for the configuration cache... REOPENED

Index: src/libs/zbxdbcache/dbconfig.c
===================================================================
--- src/libs/zbxdbcache/dbconfig.c	(revision 43181)
+++ src/libs/zbxdbcache/dbconfig.c	(revision 43182)
@@ -2575,9 +2572,11 @@
 			" where i.hostid=h.hostid"
 				" and h.status=%d"
 				" and i.status=%d"
+				" and i.flags=%d"
 				ZBX_SQL_NODE,
 			HOST_STATUS_MONITORED,
 			ITEM_STATUS_ACTIVE,
+			ZBX_FLAG_DISCOVERY_PROTOTYPE,
 			DBand_node_local("i.itemid"));
 	isec = zbx_time() - sec;

igorsh RESOLVED in r43214.

asaveljevs Looks good, but please review r43249. I have removed the check for ZBX_FLAG_DISCOVERY_PROTOTYPE from another place that no longer seems to be necessary.

igorsh Thank you. Looks good!!

asaveljevs CLOSED then.

Comment by Igors Homjakovs (Inactive) [ 2014 Mar 10 ]

Fixed in 2.0.12rc1 r43340, 2.2.3rc1 r43342 and 2.3.0(trunk) r43343.

Comment by Aleksandrs Saveljevs [ 2014 Apr 10 ]

The fix caused a regression: ZBX-8060.

Generated at Tue Apr 16 08:08:56 EEST 2024 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.