[ZBX-7170] Using item.get with output extend in the frontend Created: 2013 Oct 18  Updated: 2017 May 30  Resolved: 2013 Oct 23

Status: Closed
Project: ZABBIX BUGS AND ISSUES
Component/s: Frontend (F)
Affects Version/s: 2.1.8
Fix Version/s: 2.1.9, 2.2.0

Type: Incident report Priority: Major
Reporter: Pavels Jelisejevs (Inactive) Assignee: Ivo Kurzemnieks
Resolution: Fixed Votes: 0
Labels: frontend, history, item, performance
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

After ZBXNEXT-1689 to return the values for the lastvalue and lastclock properties item.get needs to perform a separate request to the history table. That means that unnecessary use of output extend may significantly impact performance.

The following places in the frontend must be corrected to not use output extend for item.get:

history.php
popup_trexpr.php
configuration.screen.constructor.edit.php

CApplication::massAdd()
CDiscoveryRule::copyGraphPrototypes()
CGraph::validateItems()
CGraphPrototype::validateCreate()
CGraphPrototype::validateUpdate()
CItem::delete()

CScreenClock::get()
CScreenHistory::__construct()

We should also check if there are other places with this problem.



 Comments   
Comment by richlv [ 2013 Oct 19 ]

sounds like this would make things very slow in large setups - should this be a blocker ?

Comment by Ivo Kurzemnieks [ 2013 Oct 22 ]

RESOLVED in svn://svn.zabbix.com/branches/dev/ZBX-7170

Comment by Alexander Vladishev [ 2013 Oct 23 ]

(1) 'itemid' is required in 'output' option

  • frontends/php/include/views/configuration.screen.constructor.edit.php:156
  • frontends/php/include/views/configuration.screen.constructor.edit.php:238
  • frontends/php/include/views/configuration.screen.constructor.edit.php:491
  • frontends/php/popup_trexpr.php:618
  • frontends/php/history.php:130

iivs RESOLVED in r39495

sasha CLOSED

Comment by Alexander Vladishev [ 2013 Oct 23 ]

(2) 'itemid' and 'name' are required in 'output' option

  • frontends/php/include/classes/screens/CScreenHistory.php:107

iivs RESOLVED in r39495

sasha CLOSED

Comment by Alexander Vladishev [ 2013 Oct 23 ]

(3) 'itemid' is required in 'output' option

  • frontends/php/api/classes/CDiscoveryRule.php:915

iivs RESOLVED in r39495

sasha CLOSED

Comment by Alexander Vladishev [ 2013 Oct 23 ]

(4) we have other places with this problem:

  • frontends/php/hosts.php:534
  • frontends/php/events.php:138
  • frontends/php/events.php:157
  • frontends/php/include/triggers.inc.php:329
  • frontends/php/include/views/configuration.host.edit.php:456
  • frontends/php/include/views/configuration.host.edit.php:486
  • frontends/php/include/views/configuration.host.edit.php:559
  • frontends/php/tr_status.php:426
  • frontends/php/api/classes/CGraph.php:384
  • frontends/php/api/classes/CGraphPrototype.php:391
  • frontends/php/api/classes/CDiscoveryRule.php:563
  • frontends/php/trigger_prototypes.php:354
  • frontends/php/items.php:1149
  • frontends/php/triggers.php:437
'selectItems' => API_OUTPUT_EXTEND

iivs RESOLVED in r39513

sasha CLOSED

Comment by Alexander Vladishev [ 2013 Oct 23 ]

(5) Please review my changes in r39524.

iivs REVIEWED.
Thanks!
CLOSED.

Comment by Ivo Kurzemnieks [ 2013 Oct 24 ]

Fixed in pre-2.1.9 (trunk) r39537

Generated at Fri Apr 26 00:47:18 EEST 2024 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.