Ad Widget

Collapse

Zabbix 1.8 API get map elements

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

    #1

    Zabbix 1.8 API get map elements

    Hi,

    I would like to get elements of the map using ZabbixAPI 1.8.

    When i execute the following code it returns an empty array.

    $script= ZabbixAPI::fetch_array('sysmaps_elements','get', array("output"=>'extend'))
    or die('error: '.print_r(ZabbixAPI::getLastError(),true));
    print_r($script);



    The array 'sysmaps_elements', is it the correct one to get element_name, element_id, etc.?

    Any suggestions would be appreciated.

    Thanks,
    Mike
  • mike13
    Member
    • Apr 2010
    • 30

    #2
    Does anyone know which is the correct table name to get element_name, element_id, etc using the zabbix API.
    phpmyadmin shows almost 4 tables related to map and elements. They are : sysmaps, sysmaps_elements, sysmaps_links and sysmaps_link_triggers.

    I can view sysmaps table as follow:

    $script= ZabbixAPI::fetch_array('map','get', array("output"=>'extend'))
    or die('error: '.print_r(ZabbixAPI::getLastError(),true));
    print_r($script);


    Does anyone know how to view the sysmaps_elements table?

    Thanks,
    Mike
    Last edited by mike13; 23-06-2010, 09:37.

    Comment

    • mike13
      Member
      • Apr 2010
      • 30

      #3
      Hi,

      Does anyone know how add elements to map using the zabbix php API?

      Any suggestions would be appreciated.

      Thanks,
      Mike.

      Comment

      Working...