-
Problem report
-
Resolution: Duplicate
-
Major
-
None
-
6.0.7
-
Ubuntu 20.04, Postgres 14.5, nginx 1.20.1
Zabbix Sever VM: 4 cores, 16GB
DB VM: 4 cores, 8GB
Hosts: 2133
Items: 138196
NVPS: 975
Steps to reproduce:
- Upgraded from 5.0.x to 6.0.7
- Create user with role user
- Go to Monitoring -> Hosts
Result
The Hosts page takes a long time to load (~30s). The debug shows this is caused by one SQL query, that fetches the number of graphs for each of the hosts (the Graphs column)
This is not an issue for super user accounts.
Query:
SQL (30.400495): SELECT COUNT(DISTINCT g.graphid) AS rowscount,i.hostid FROM graphs g,graphs_items gi,items i WHERE NOT EXISTS (SELECT NULL FROM graphs_items gi,items i,hosts_groups hgg LEFT JOIN rights r ON r.id=hgg.groupid AND r.groupid IN (11,14,18) WHERE g.graphid=gi.graphid AND gi.itemid=i.itemid AND i.hostid=hgg.hostid GROUP BY i.hostid HAVING MAX(permission)<'2' OR MIN(permission) IS NULL OR MIN(permission)=0) AND i.hostid IN (10603,10604,10607,10610,10838,10849,10850,11037,11049,11050,11067,11076,11491,11716,11717,11718,11719,11721,11723,11724,11725,11726,11741,11772,12150,14406,14407,14408,14409,14410,14411,14412,14413,14414,14415,14416,14417,14418,14421,14422,14423,14424,14425,14426,15837,15951,16037,16038,16156,16161) AND gi.graphid=g.graphid AND i.itemid=gi.itemid AND g.flags IN (0,4) GROUP BY i.hostid
Expected:
The load time for the query should be shorter
- duplicates
-
ZBXNEXT-5878 Enhance permission checking/handling
- Closed