Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem panel too slow #720

Closed
silveraignacio opened this issue Apr 14, 2019 · 4 comments
Closed

Problem panel too slow #720

silveraignacio opened this issue Apr 14, 2019 · 4 comments

Comments

@silveraignacio
Copy link

Describe the bug
Hello! Actually I have configured two datasources on my Grafana instance, and both are zabbix datasources.
I added a new "Zabbix Problems" panel, and configure it with the both datasources mentioned above. Actually is taking more than 12 seconds to display all the problems when both datasources are configured. If I remove datasource "A" panel is so fast, but when I want to reach only data from "A" panel is very slow again.

I suppose it was an issue with zabbix, but I have executed the same api call from command line and it get the info in just 1 second. Also checked if there was some slow query on Zabbix and all seems to be fine. Directly from zabbix front end, it not takes more than 2 seconds to get the problems.

It only happens when I want to get zabbix problems from datasurce A (actually it gets 42 problems).

Please find below more information about behaviour:

CURL COMMAND:


curl 'http://172.16.104.200/zabbix/api_jsonrpc.php' -H 'Host: 172.16.104.200' -H 'User-Agent: Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/60.0' -H 'Accept: application/json, text/plain, */*' -H 'Accept-Language: es-AR,es;q=0.8,en-US;q=0.5,en;q=0.3' --compressed -H 'Referer: http://172.16.104.250:3000/d/edK7D1RZk/vista-general-dc?orgId=1' -H 'Content-Type: application/json' -H 'Origin: http://172.16.104.250:3000' -H 'Connection: keep-alive' --data '{"jsonrpc":"2.0","method":"alert.get","params":{"eventids":["126950","126951","1438858","1438859","1457995","1483365","1514604","1514605","1514606","1514608","1514609","1514610","1583814","1597241","1635800","1635801","1635802","1635803","1695033","1695036","1832909","1933848","1943618","1961950","1962368","1981839","2013138","2036108","2046354","2053904","2053905","2063836"],"output":"extend","selectUsers":true},"id":1,"auth":"17e2ba5d8cecb2bcaeec22f2ec4b9ad5"}' >/dev/null 
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 20.5M    0 20.5M  100   466  20.6M    468 --:--:-- --:--:-- --:--:-- 20.6M

CURL TIME COMMAND

time curl 'http://172.16.104.200/zabbix/api_jsonrpc.php' -H 'Host: 172.16.104.200' -H 'User-Agent: Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/60.0' -H 'Accept: application/json, text/plain, */*' -H 'Accept-Language: es-AR,es;q=0.8,en-US;q=0.5,en;q=0.3' --compressed -H 'Referer: http://172.16.104.250:3000/d/edK7D1RZk/vista-general-dc?orgId=1' -H 'Content-Type: application/json' -H 'Origin: http://172.16.104.250:3000' -H 'Connection: keep-alive' --data '{"jsonrpc":"2.0","method":"alert.get","params":{"eventids":["126950","126951","1438858","1438859","1457995","1483365","1514604","1514605","1514606","1514608","1514609","1514610","1583814","1597241","1635800","1635801","1635802","1635803","1695033","1695036","1832909","1933848","1943618","1961950","1962368","1981839","2013138","2036108","2046354","2053904","2053905","2063836"],"output":"extend","selectUsers":true},"id":1,"auth":"17e2ba5d8cecb2bcaeec22f2ec4b9ad5"}' >/dev/null 
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 20.5M    0 20.5M  100   466  21.3M    484 --:--:-- --:--:-- --:--:-- 21.3M

real	0m0.970s
user	0m0.005s
sys	0m0.042s

NETWORK STATISTICS FROM FIREFOX

imagen

imagen

Software versions

Grafana v5.4.2 (d812109)
Zabbix plugin 3.10.1
Zabbix Server 4.0.4

Please, if you need further information or tests, please let me know

@alexanderzobnin
Copy link
Collaborator

It seems it's related to #712

@alexanderzobnin alexanderzobnin added this to the 3.10.2 milestone Apr 19, 2019
@silveraignacio
Copy link
Author

Hello! I have discovered that part of the slowly response is made by the network speed. Actually I tried to download a file of 25MB(the same as json reposnse) and it takes approximately 15 seconds, so part of the delay is caused by network. I reach data through a VPN.
Anyway, if I’m in the same network the json response is still slow.

I have increased php memory and it has the same behavior.

I hope this info helps to the troubleshooting

@alexanderzobnin
Copy link
Collaborator

@silveraignacio could you test it out from the latest master and confirm that the problem is gone?

@silveraignacio
Copy link
Author

Just to inform you, the issue was completely fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants