I am trying to create a host in 1.9.9 using Zabbix API, but it fails.
Here is my JSON-RPC object:
{
"params" : {
"interfaces" : [
,
{ "useip" : 1, "ip" : "10.1.2.3", "type" : 2, "port" : 161 } ],
"groups" : [
],
"templates" : [
],
"host" : "myhost1"
},
"auth" : "f201fa9018f8f59fca8aea5577aab156",
"jsonrpc" : "2.0",
"method" : "host.create",
"id" : 7
}
I get the following error message:
In create_host: Error:
I have double checked that group and template ids do exist. I guess this might be a typo or brackets issue, but I can't find it.
Host.create() call worked for me flawlessly in 1.8. I modified it for use with 1.9 according to this manual: http://www.zabbix.com/documentation/2.0/manual/appendix/api/host/create
I'm very sorry if I have overlooked something, and this error is caused by my mistake, please forgive me in that case.