[ZBX-7872] NVPS calculation logic of frontend (PHP) is not syncing with server (C) Created: 2014 Feb 26 Updated: 2017 May 30 Resolved: 2014 Mar 10 |
|
Status: | Closed |
Project: | ZABBIX BUGS AND ISSUES |
Component/s: | Frontend (F) |
Affects Version/s: | 2.0.11, 2.2.2 |
Fix Version/s: | 2.0.12rc1, 2.2.3rc1, 2.3.0 |
Type: | Incident report | Priority: | Trivial |
Reporter: | HAYASHI Kentaro | Assignee: | Unassigned |
Resolution: | Fixed | Votes: | 0 |
Labels: | nvps | ||
Remaining Estimate: | Not Specified | ||
Time Spent: | Not Specified | ||
Original Estimate: | Not Specified |
Attachments: | ignore-items-with-flags-discovery-prototype-for-qps-total.patch |
Description |
It seems that NVPS calculation logic of frontend is not syncing with server. Here is the current svn code in frontends/php/include/func.inc.php: // comments: !!! Don't forget sync code with C !!! In above code, it doesn't care the value of flags column in items table. Trapper just ignores ZBX_FLAG_DISCOVERY_PROTOTYPE when checking active items in C code, so need to I've attached a patch to fix this glitch between C and PHP code for svn HEAD. |
Comments |
Comment by HAYASHI Kentaro [ 2014 Feb 26 ] |
"do same thing in frontend" means adding following part to query. ' AND i.flags<>'.ZBX_FLAG_DISCOVERY_PROTOTYPE |
Comment by Igors Homjakovs (Inactive) [ 2014 Mar 04 ] |
Fixed in svn://svn.zabbix.com/branches/dev/ZBX-7872 |
Comment by Aleksandrs Saveljevs [ 2014 Mar 05 ] |
(1) We seem to prefer "flags<>ZBX_FLAG_DISCOVERY_PROTOTYPE" over "flags in (ZBX_FLAG_DISCOVERY_NORMAL,ZBX_FLAG_DISCOVERY_RULE,ZBX_FLAG_DISCOVERY_CREATED)". Why don't we do the same here for consistency? igorsh RESOLVED in r43208. asaveljevs The same needs to be done in 2.0 branch. REOPENED. igorsh RESOLVED in r43295. asaveljevs In 2.0 branch, there is an error in the frontend when opening the dashboard, REOPENED:
igorsh RESOLVED in r43327. asaveljevs In 2.0 branch, "flags<>ZBX_FLAG_DISCOVERY_CHILD" was only done in the frontend. How about the server side? REOPENED. igorsh RESOLVED in r43333. asaveljevs Looks good now. Its presence does not hurt, but you might or might not wish to remove unused constant ZBX_FLAG_DISCOVERY_NORMAL from C header when merging. CLOSED. |
Comment by Aleksandrs Saveljevs [ 2014 Mar 05 ] |
(2) dbconfig.c contains the following changes: Index: src/libs/zbxdbcache/dbconfig.c =================================================================== --- src/libs/zbxdbcache/dbconfig.c (revision 43179) +++ src/libs/zbxdbcache/dbconfig.c (revision 43180) @@ -5636,7 +5636,7 @@ while (NULL != (item = zbx_hashset_iter_next(&iter))) { - if (0 != item->delay) + if (0 != item->delay && ZBX_FLAG_DISCOVERY_PROTOTYPE != item->flags) nvps += 1.0 / item->delay; } Note that after igorsh RESOLVED in r43355. asaveljevs Looks good. CLOSED. |
Comment by Igors Homjakovs (Inactive) [ 2014 Mar 10 ] |
Fixed in version 2.0.12rc1 r43347, 2.2.3rc1 r43349 and r43372, 2.3.0 (trunk) r43350 and r43373. |