[ZBX-8897] Getting first event for non-Super-Admin user is slow on Monitoring->Events page Created: 2014 Oct 14  Updated: 2017 May 30  Resolved: 2016 Sep 15

Status: Closed
Project: ZABBIX BUGS AND ISSUES
Component/s: Frontend (F)
Affects Version/s: 2.2.6
Fix Version/s: 2.2.15rc1, 3.0.5rc1

Type: Incident report Priority: Blocker
Reporter: Alexey Pustovalov Assignee: Unassigned
Resolution: Fixed Votes: 1
Labels: events, oracle, performance
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Oracle, MySQL


Issue Links:
Duplicate
is duplicated by ZBX-11366 CLONE - Getting first event for non-S... Closed

 Description   

Zabbix frontend gets the oldest eventid in any cases using the next call:

5. event->get [events.php:390]
Parameters:
Array
(
    [source] => 0
    [object] => 0
    [output] => extend
    [objectids] => 
    [sortfield] => Array
        (
            [0] => clock
        )

    [sortorder] => ASC
    [limit] => 1
)
Result:
Array
(
    [0] => Array
        (
            [eventid] => 219
            [source] => 0
            [object] => 0
            [objectid] => 13628
            [clock] => 1401317490
            [value] => 0
            [acknowledged] => 0
            [ns] => 365969275
        )

)

query looks like:

  • MySQL:
    SELECT e.* FROM events e WHERE EXISTS (SELECT NULL FROM functions f,items i,hosts_groups hgg JOIN rights r ON r.id=hgg.groupid AND r.groupid='7' WHERE e.objectid=f.triggerid AND f.itemid=i.itemid AND i.hostid=hgg.hostid GROUP BY f.triggerid HAVING MIN(r.permission)>0 AND MAX(r.permission)>=2) AND e.object='0' AND e.source='0' ORDER BY e.clock LIMIT 1 OFFSET 0
    
  • ORACLE:
    SELECT * FROM (SELECT   e.* FROM events e WHERE EXISTS (SELECT NULL FROM functions f,items i,hosts_groups hgg JOIN rights r ON r.id=hgg.groupid AND r.groupid=:"SYS_B_0" WHERE e.objectid=f.triggerid AND f.itemid=i.itemid AND i.hostid=hgg.hostid GROUP BY f.triggerid HAVING MIN(r.permission)>:"SYS_B_1" AND MAX(r.permission)>=:"SYS_B_2") AND e.object=:"SYS_B_3" AND e.source=:"SYS_B_4" ORDER BY e.clock) WHERE rownum BETWEEN :"SYS_B_5" AND :"SYS_B_6"
    

    In this case we need only min clock to build time line.



 Comments   
Comment by Bezaleel Ramos [ 2016 Aug 25 ]

Hi,

I have this problem with non-Super-Admins.

Exists some limitation when user non-Super-Admins, the DashBoard,Triggers,Events is very slow to load

My Zabbix is 3.0.4

Beza

Comment by Alexander Vladishev [ 2016 Sep 13 ]

Fixed in development branch svn://svn.zabbix.com/branches/dev/ZBX-8897

Comment by Alexander Vladishev [ 2016 Sep 13 ]

(1) No translation strings changed

gunarspujats CLOSED

Comment by Gunars Pujats (Inactive) [ 2016 Sep 14 ]

Successfully tested.

Comment by Alexander Vladishev [ 2016 Sep 15 ]

Fixed in:

  • pre-2.2.15rc1 r62527
  • pre-3.0.5rc1 r62528
Generated at Thu Apr 25 22:05:25 EEST 2024 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.