Zabbix Connector - Connection test failed: ERROR EXECUTING REQUEST: Method failed: (/zabbix/api_jsonrpc.php) with code: 500

Daniel Carvalho
Kilo Guru

Hello folks

I want to share this (pehaps) undocumented scenario:

While setting up a Connector for Zabbix (under Event Management) we received this message, when tried to test the connection:

Connection test failed: ERROR EXECUTING REQUEST: Method failed: (/zabbix/api_jsonrpc.php) with code: 500

Diagnosis:

We have found out that that is a false notice of failed connection atempt. TCP connection itself was OK, 

But the way ServiceNow´s code for native Zabbix plugin connection was designed, it was "testing" the connection by using an absolutely unfiltered trigger.get query. On large Zabbix envinronments this causes error 500 on the server side.

Solution:

In order to get a "green" response in the connection test (required for our gathering of test evidences) we adusted the parameter API call (https://www.zabbix.com/documentation/4.0/manual/api/reference/trigger/get) so it returns really few records and then the test is deemed sucessfull.

P.S. some other internet source pointed alternative solution by adjusting Zabbix Server parameter of max memory usage from 128 to 256, in order to preven error at the API query processing. We have not tried that. For example: https://stackoverflow.com/questions/41808622/zabbix-and-php-fatal-error-allowed-memory-size-of-13421... 

Cordial

Daniel

 

1 ACCEPTED SOLUTION

Daniel Carvalho
Kilo Guru

Solution:

In order to get a "green" response in the connection test (required for our gathering of test evidences) we adusted the parameter API call (https://www.zabbix.com/documentation/4.0/manual/api/reference/trigger/get) so it returns really few records and then the test is deemed sucessfull.

View solution in original post

2 REPLIES 2

arielgritti
Mega Sage

Thanks for share Daniel!

Ariel

Daniel Carvalho
Kilo Guru

Solution:

In order to get a "green" response in the connection test (required for our gathering of test evidences) we adusted the parameter API call (https://www.zabbix.com/documentation/4.0/manual/api/reference/trigger/get) so it returns really few records and then the test is deemed sucessfull.