CURL URL: http://zabbix-test.thorko.de/monitor/api_jsonrpc.php
CURL Options: Array
(
[19913] => 1
[13] => 30
[78] => 5
[81] =>
[64] =>
[52] => 1
[74] => 1
[10023] => Array
(
[0] => Content-Type: application/json-rpc
[1] => User-Agent: ZabbixAPI v1.0 - http://andrewfarley.com/zabbix_php_api
)
[10036] => POST
[10015] => {"auth":null,"method":"user.authenticate","id":1,"params":{"password":"L3sh0thw0O!","user":"admin"},"jsonrpc":"2.0"}
[10102] => gzip
)
Got response from API: ({"jsonrpc":"2.0","result":"dd2ff148338334ef917547f21a25749f","id":1})
Response decoded: (Array
(
[jsonrpc] => 2.0
[result] => dd2ff148338334ef917547f21a25749f
[id] => 1
)
__login() Got response from API: (dd2ff148338334ef917547f21a25749f)
CURL URL: http://zabbix-test.thorko.de/monitor/api_jsonrpc.php
CURL Options: Array
(
[19913] => 1
[13] => 30
[78] => 5
[81] =>
[64] =>
[52] => 1
[74] => 1
[10023] => Array
(
[0] => Content-Type: application/json-rpc
[1] => User-Agent: ZabbixAPI v1.0 - http://andrewfarley.com/zabbix_php_api
)
[10036] => POST
[10015] => {"auth":"dd2ff148338334ef917547f21a25749f","method":"apiinfo.version","id":1,"params":[],"jsonrpc":"2.0"}
[10102] => gzip
)
Got response from API: ({"jsonrpc":"2.0","result":"1.4","id":1})
Response decoded: (Array
(
[jsonrpc] => 2.0
[result] => 1.4
[id] => 1
)
Server running Zabbix API Version: 1.4
CURL URL: http://zabbix-test.thorko.de/monitor/api_jsonrpc.php
CURL Options: Array
(
[19913] => 1
[13] => 30
[78] => 5
[81] =>
[64] =>
[52] => 1
[74] => 1
[10023] => Array
(
[0] => Content-Type: application/json-rpc
[1] => User-Agent: ZabbixAPI v1.0 - http://andrewfarley.com/zabbix_php_api
)
[10036] => POST
[10015] => {"auth":"dd2ff148338334ef917547f21a25749f","method":"host.update","id":1,"params":{"hostid":10017,"interfaces":{"dns":"","main":1,"hostid":10017,"useip":1,"type":4,"ip":"127.0.0.1","port":"8810"}},"jsonrpc":"2.0"}
[10102] => gzip
)
Got response from API: ({"jsonrpc":"2.0","error":{"code":-32400,"message":"System error.","data":"JSON-rpc error generation failed. No such error \"\".","debug":[{"file":"\/var\/www\/zabbix-test\/api\/classes\/CHostInterface.php","line":929,"function":"hostInterfaceTypeNumToName","args":[""]},{"file":"\/var\/www\/zabbix-test\/api\/classes\/CHostInterface.php","line":805,"function":"checkMainInterfaces","class":"CHostInterface","type":"->","args":[{"dns":{"hostid":10017},"main":1,"hostid":10017,"useip":1,"type":4,"ip":"127.0.0.1","port":"1810"}]},{"file":"\/var\/www\/zabbix-test\/api\/classes\/CHostInterface.php","line":735,"function":"checkHostInterfaces","class":"CHostInterface","type":"->","args":[{"dns":"","main":1,"hostid":10017,"useip":1,"type":4,"ip":"127.0.0.1","port":"8810"},10017]},{"file":"\/var\/www\/zabbix-test\/api\/classes\/CHost.php","line":1657,"function":"replaceHostInterfaces","class":"CHostInterface","type":"->","args":[{"hostid":10017,"interfaces":{"dns":"","main":1,"hostid":10017,"useip":1,"type":4,"ip":"127.0.0.1","port":"8810"}}]},{"function":"update","class":"CHost","type":"->","args":[{"hostid":10017,"interfaces":{"dns":"","main":1,"hostid":10017,"useip":1,"type":4,"ip":"127.0.0.1","port":"8810"}}]},{"file":"\/var\/www\/zabbix-test\/api\/rpc\/class.czbxrpc.php","line":106,"function":"call_user_func","args":[[{},"update"],{"hostid":10017,"interfaces":{"dns":"","main":1,"hostid":10017,"useip":1,"type":4,"ip":"127.0.0.1","port":"8810"}}]},{"file":"\/var\/www\/zabbix-test\/api\/rpc\/class.czbxrpc.php","line":64,"function":"callAPI","class":"czbxrpc","type":"::","args":["host.update",{"hostid":10017,"interfaces":{"dns":"","main":1,"hostid":10017,"useip":1,"type":4,"ip":"127.0.0.1","port":"8810"}}]},{"file":"\/var\/www\/zabbix-test\/api\/rpc\/class.cjsonrpc.php","line":66,"function":"call","class":"czbxrpc","type":"::","args":["host.update",{"hostid":10017,"interfaces":{"dns":"","main":1,"hostid":10017,"useip":1,"type":4,"ip":"127.0.0.1","port":"8810"}},"dd2ff148338334ef917547f21a25749f"]},{"file":"\/var\/www\/zabbix-test\/api_jsonrpc.php","line":54,"function":"execute","class":"CJSONrpc","type":"->","args":[]}]},"id":1})
Response decoded: (Array
(
[jsonrpc] => 2.0
[error] => Array
(
[code] => -32400
[message] => System error.
[data] => JSON-rpc error generation failed. No such error "".
[debug] => Array
(
[0] => Array
(
[file] => /var/www/zabbix-test/api/classes/CHostInterface.php
[line] => 929
[function] => hostInterfaceTypeNumToName
[args] => Array
(
[0] =>
)
)
[1] => Array
(
[file] => /var/www/zabbix-test/api/classes/CHostInterface.php
[line] => 805
[function] => checkMainInterfaces
[class] => CHostInterface
[type] => ->
[args] => Array
(
[0] => Array
(
[dns] => Array
(
[hostid] => 10017
)
[main] => 1
[hostid] => 10017
[useip] => 1
[type] => 4
[ip] => 127.0.0.1
[port] => 1810
)
)
)
[2] => Array
(
[file] => /var/www/zabbix-test/api/classes/CHostInterface.php
[line] => 735
[function] => checkHostInterfaces
[class] => CHostInterface
[type] => ->
[args] => Array
(
[0] => Array
(
[dns] =>
[main] => 1
[hostid] => 10017
[useip] => 1
[type] => 4
[ip] => 127.0.0.1
[port] => 8810
)
[1] => 10017
)
)
[3] => Array
(
[file] => /var/www/zabbix-test/api/classes/CHost.php
[line] => 1657
[function] => replaceHostInterfaces
[class] => CHostInterface
[type] => ->
[args] => Array
(
[0] => Array
(
[hostid] => 10017
[interfaces] => Array
(
[dns] =>
[main] => 1
[hostid] => 10017
[useip] => 1
[type] => 4
[ip] => 127.0.0.1
[port] => 8810
)
)
)
)
[4] => Array
(
[function] => update
[class] => CHost
[type] => ->
[args] => Array
(
[0] => Array
(
[hostid] => 10017
[interfaces] => Array
(
[dns] =>
[main] => 1
[hostid] => 10017
[useip] => 1
[type] => 4
[ip] => 127.0.0.1
[port] => 8810
)
)
)
)
[5] => Array
(
[file] => /var/www/zabbix-test/api/rpc/class.czbxrpc.php
[line] => 106
[function] => call_user_func
[args] => Array
(
[0] => Array
(
[0] => Array
(
)
[1] => update
)
[1] => Array
(
[hostid] => 10017
[interfaces] => Array
(
[dns] =>
[main] => 1
[hostid] => 10017
[useip] => 1
[type] => 4
[ip] => 127.0.0.1
[port] => 8810
)
)
)
)
[6] => Array
(
[file] => /var/www/zabbix-test/api/rpc/class.czbxrpc.php
[line] => 64
[function] => callAPI
[class] => czbxrpc
[type] => ::
[args] => Array
(
[0] => host.update
[1] => Array
(
[hostid] => 10017
[interfaces] => Array
(
[dns] =>
[main] => 1
[hostid] => 10017
[useip] => 1
[type] => 4
[ip] => 127.0.0.1
[port] => 8810
)
)
)
)
[7] => Array
(
[file] => /var/www/zabbix-test/api/rpc/class.cjsonrpc.php
[line] => 66
[function] => call
[class] => czbxrpc
[type] => ::
[args] => Array
(
[0] => host.update
[1] => Array
(
[hostid] => 10017
[interfaces] => Array
(
[dns] =>
[main] => 1
[hostid] => 10017
[useip] => 1
[type] => 4
[ip] => 127.0.0.1
[port] => 8810
)
)
[2] => dd2ff148338334ef917547f21a25749f
)
)
[8] => Array
(
[file] => /var/www/zabbix-test/api_jsonrpc.php
[line] => 54
[function] => execute
[class] => CJSONrpc
[type] => ->
[args] => Array
(
)
)
)
)
[id] => 1
)