grafana-zabbix icon indicating copy to clipboard operation
grafana-zabbix copied to clipboard

Zabbix API request error" error="request failed, status: 500 Internal Server Error

Open buadams opened this issue 1 year ago • 8 comments

I have the following versions.

zabbix_server -V zabbix_server (Zabbix) 6.0.23 Revision 315e9acac58 31 October 2023, compilation time: Oct 31 2023 08:37:09

grafana-server -v Version 10.2.0 (commit: 895fbafb7a, branch: HEAD, enterprise-commit: 6475d0de)

Plugin Version 4.4.5

While it is working for some nodes. I'm getting the below error with some nodes when creating the dashboard.

Request failed, status: 500 Internal Server Error

Grafana_Logs:

logger=plugin.alexanderzobnin-zabbix-datasource t=2024-01-16T09:51:02.550589684+04:00 level=error msg="Zabbix API request error" error="request failed, status: 500 Internal Server Error" logger=context userId=1 orgId=1 uname=haneef t=2024-01-16T09:51:02.551013788+04:00 level=error msg="Request Completed" method=POST path=/api/datasources/2/resources/zabbix-api status=500 remote_addr=10.1.1.10 time_ms=1198 duration=1.198236472s size=95 referer="http://172.16.1.15:3000/dashboard/new?editPanel=1&orgId=1" handler=/api/datasources/:id/resources/*

Help and suggestions, please! Thanks

buadams avatar Jan 16 '24 06:01 buadams

Suggestions, please!

buadams avatar Jan 23 '24 08:01 buadams

It is really hard to suggest something here as it doesn't have a clear reproduction steps and the error you pasted is pretty generic. Can you help us with clear reproduction steps so we can help?

zoltanbedi avatar Jan 23 '24 12:01 zoltanbedi

Could it potentially be related to this? https://github.com/grafana/grafana-zabbix/issues/1622

The plugin holds correctly the 1 hour interval but more than that the plugin process starts to restart.

catherinetcai avatar Jan 25 '24 18:01 catherinetcai

I am still checking. Thanks for the response. Let me come back with an update.

buadams avatar Jan 29 '24 17:01 buadams

I have the following versions.

zabbix_server -V zabbix_server (Zabbix) 6.0.23 Revision 315e9acac58 31 October 2023, compilation time: Oct 31 2023 08:37:09

grafana-server -v Version 10.2.0 (commit: 895fbafb7a, branch: HEAD, enterprise-commit: 6475d0de)

Plugin Version 4.4.5

While it is working for some nodes. I'm getting the below error with some nodes when creating the dashboard.

Request failed, status: 500 Internal Server Error

Grafana_Logs:

logger=plugin.alexanderzobnin-zabbix-datasource t=2024-01-16T09:51:02.550589684+04:00 level=error msg="Zabbix API request error" error="request failed, status: 500 Internal Server Error" logger=context userId=1 orgId=1 uname=haneef t=2024-01-16T09:51:02.551013788+04:00 level=error msg="Request Completed" method=POST path=/api/datasources/2/resources/zabbix-api status=500 remote_addr=10.1.1.10 time_ms=1198 duration=1.198236472s size=95 referer="http://172.16.1.15:3000/dashboard/new?editPanel=1&orgId=1" handler=/api/datasources/:id/resources/*

Help and suggestions, please! Thanks

Error 500 may indicate that Zabbix is having difficulty processing the complexity of your API request. To resolve this, consider optimizing your Zabbix web server (nginx or Apache), or alternatively, try reducing the scope of your query in Grafana. These performance adjustments may be necessary to ensure that Zabbix can handle processing demands efficiently.

bernardolankheet avatar Mar 19 '24 13:03 bernardolankheet

I am experiencing this with Juniper routers only, while other SNMP-monitored devices are working fine. I tried minimizing the scope of the query, but the issue persists. I have Nginx as the Zabbix web server. could you please suggest what kind of optimization would help here? Thanks

buadams avatar Mar 19 '24 21:03 buadams

Can you show a query on your dashboard?

you can change php timeouts and requests normally in:

/etc/php-fpm.d/www.conf [On CentOS/RHEL/Fedora]
/etc/php/7.2/fpm/pool.d/www.conf [On Ubuntu/Debian/Mint]
/etc/opt/rh/rh-php72/php-fpm.d/zabbix.conf [On Redhat]

In nginx, normally in .conf file, custom body size, buffer, timeout and etc.

There is no way to suggest a pattern without knowing your environment, but these configurations are normally carried out in large environments, with several simultaneous accesses to Grafana and the Zabbix frontend.

bernardolankheet avatar Mar 20 '24 17:03 bernardolankheet

I also encounter the same error. Initially I tried to upgrade from 9.4.12 to 10.4.1 but ran into issues. For testing, I installed version 10.4.1 in a new environment with plugin 4.4.6, but the problem persists. Grafana is installed on a Windows server. It is important to note that the plugin was working correctly before the upgrade. logger=context userId=1 orgId=1 uname=admin t=2024-04-05T17:38:42.1804241+02:00 level=error msg="Internal server error" error="[plugin.downstreamError] client: failed to call resources: [plugin.unavailable] plugin unavailable" remote_addr=[::1] traceID= logger=context userId=1 orgId=1 uname=admin t=2024-04-05T17:38:42.1804241+02:00 level=error msg="Request Completed" method=POST path=/api/datasources/1/resources/zabbix-api status=500 remote_addr=[::1] time_ms=1 duration=1.8828ms size=116 referer=http://localhost:3000/connections/datasources/edit/ddhtst12pq8sge handler=/api/datasources/:id/resources/* status_source=downstream

MamadR7 avatar Apr 05 '24 15:04 MamadR7