When I try to create a new item using item.create, then the interfaceid is required, unless the item type is "Zabbix Agent Active". This is written explicitely in the documentation. But how do I create an item that has "Zabbix Agent Active" type? I see no way for specifying the item type in the item.create API call. It is possible to give so called "applications", and apparently there are applications that are called "Zabbix Agent Active". However, there are lots of them. For example, if I call application.get(filter:{name:'Zabbix Agent Active'}) then I get 11 different items with different ids. All of them are named 'Zabbix Agent Active'. Which one should I apply? Or maybe I need to do something else to create an item without an interface?
If I pass type=7 to the item.create API call then I get this error:
pyzabbix.ZabbixAPIException: ('Error -32500: Application error., SQL statement execution has failed "INSERT INTO items (delay,hostid,key_,name,type,value_type,descriptio n,history,interfaceid,master_itemid,flags,params,i temid) VALUES (\'120\',\'10278\',\'vl.missing_deletions\',\'Hián yzó várólista törlések és halasztások\',\'7\',\'3\',\'Olyan előjegyzések, amiknél a tervezett időpont a mai nap előtt van, és [ van várólista azonosítója, vagy nincs vl. azonosítója, és nem magánpraxisos ].\',\'365d\',NULL,NULL,\'0\',\'\',\'29211\')".', -32500)
Is this a bug?
If I pass type=7 to the item.create API call then I get this error:
pyzabbix.ZabbixAPIException: ('Error -32500: Application error., SQL statement execution has failed "INSERT INTO items (delay,hostid,key_,name,type,value_type,descriptio n,history,interfaceid,master_itemid,flags,params,i temid) VALUES (\'120\',\'10278\',\'vl.missing_deletions\',\'Hián yzó várólista törlések és halasztások\',\'7\',\'3\',\'Olyan előjegyzések, amiknél a tervezett időpont a mai nap előtt van, és [ van várólista azonosítója, vagy nincs vl. azonosítója, és nem magánpraxisos ].\',\'365d\',NULL,NULL,\'0\',\'\',\'29211\')".', -32500)
Is this a bug?
Comment