I'm having a problem with the zabbix API when I try and add a host to multiple host groups:
api.host.create({ 'host' : (options.dns),'dns' : (options.dns),'ip' : (options.ipaddr),'port' : 10050,'useip' : 0,'groups' : [{ "groupid":100100000000002 }],'templates' : [{ "templateid":100100000010001}]})
This works fine but as you can tell it only adds to a single host group, what if I wanted to add the host to other host groups? I have tried to add templateid multiple times and it seems only the last time is accepted.
Thanks.
api.host.create({ 'host' : (options.dns),'dns' : (options.dns),'ip' : (options.ipaddr),'port' : 10050,'useip' : 0,'groups' : [{ "groupid":100100000000002 }],'templates' : [{ "templateid":100100000010001}]})
This works fine but as you can tell it only adds to a single host group, what if I wanted to add the host to other host groups? I have tried to add templateid multiple times and it seems only the last time is accepted.
Thanks.
Comment