Ad Widget

Collapse

Zabbix 1.8 API item & trigger

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • mike13
    Member
    • Apr 2010
    • 30

    #1

    Zabbix 1.8 API item & trigger

    Hi,

    I would like to create an item (type:External check) and a custom trigger using ZabbixAPI 1.8.

    When i execute the following code it creates the host but the item is left blank.

    ZabbixAPI::query('host','create',array('host'=>'ho st1',"ip"=>"192.168.0.1","port"=>10050, "item"=>array('host'=>1host,'Description'=>'Simple _Ping','Type'=>'External check'), 'groups'=>array(1004)))
    or die('error: '.print_r(ZabbixAPI::getLastError(),true));

    Any suggestions would be appreciated.

    Thanks,
    Mike
    Last edited by mike13; 15-06-2010, 11:18.
  • Aly
    ZABBIX developer
    • May 2007
    • 1126

    #2
    For item creation you should use Item.create, same for trigger Trigger.create.
    Zabbix | ex GUI developer

    Comment

    Working...