[ZBX-8904] Getting all interfaces from DB Created: 2014 Oct 15 Updated: 2017 May 30 Resolved: 2014 Oct 20 |
|
Status: | Closed |
Project: | ZABBIX BUGS AND ISSUES |
Component/s: | API (A) |
Affects Version/s: | 2.2.6 |
Fix Version/s: | 2.2.8rc1, 2.4.2rc1, 2.5.0 |
Type: | Incident report | Priority: | Blocker |
Reporter: | Alexey Pustovalov | Assignee: | Unassigned |
Resolution: | Fixed | Votes: | 0 |
Labels: | performance | ||
Remaining Estimate: | Not Specified | ||
Time Spent: | Not Specified | ||
Original Estimate: | Not Specified |
Issue Links: |
|
Description |
If one of item keys contain {HOST.IP} (or similar macros), Zabbix tries to expand it and executes the next query on Monitoring->Latest data page: SQL (0.00014): SELECT hi.interfaceid,hi.ip,hi.dns,hi.useip FROM interface hi latest.php:202 ? CMacrosResolverHelper::resolveItemKeys() ? CMacrosResolver->resolveItemKeys() ? CAPIObject->get() ? CAPIObject->__call() ? czbxrpc::call() ? czbxrpc::callAPI() ? call_user_func() ? CItem->get() ? CItem->addRelatedObjects() ? CHostInterface->get() ? DBselect() in /var/www/zabbix/2.2.6/api/classes/CHostInterface.php:195 a part of code from CItem class: // adding interfaces if ($options['selectInterfaces'] !== null && $options['selectInterfaces'] != API_OUTPUT_COUNT) { $relationMap = $this->createRelationMap($result, 'itemid', 'interfaceid'); $interfaces = API::HostInterface()->get(array( 'nodeids' => $options['nodeids'], 'output' => $options['selectInterfaces'], 'intefaceids' => $relationMap->getRelatedIds(), 'nopermissions' => true, 'preservekeys' => true )); $result = $relationMap->mapMany($result, $interfaces, 'interfaces'); } So it tries to retrieve all interfaces from database. |
Comments |
Comment by Krists Krigers (Inactive) [ 2014 Oct 15 ] |
Fixed and committed in r49909, branch svn://svn.zabbix.com/branches/dev/ZBX-8904 (copy of branches/2.2). |
Comment by richlv [ 2014 Oct 16 ] |
the same problem seems to be present in 2.0, too - will we fix it there ? kristsk Yes. kristsk Actually this bug is not present in 2.0, so it is a "No". <richlv> ah, sorry, apparently i mixed up the branches |
Comment by Ivo Kurzemnieks [ 2014 Oct 17 ] |
(1) String changes? kristsk No string changes. RESOLVED. iivs CLOSED. |
Comment by Ivo Kurzemnieks [ 2014 Oct 17 ] |
(2) Regarding interfaces, let's also fix typo "iterface" kristsk RESOLVED in r50045. iivs CLOSED. |
Comment by Ivo Kurzemnieks [ 2014 Oct 21 ] |
TESTED |
Comment by Krists Krigers (Inactive) [ 2014 Oct 28 ] |
Fixed and merged to:
Updated API changelogs: sasha moved information about this fix from Appendix 2. Changes from 2.2 to 2.4 into Zabbix API changes in 2.4 CLOSED |