Ad Widget

Collapse

Zabbix 2.0 API -- Item.Get

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • bturnbough
    Member
    • Mar 2011
    • 70

    #1

    Zabbix 2.0 API -- Item.Get

    Hi All,

    I have a host with 3 templates. Each template contains 4 items, for a total of 12 items.

    On the host, I have disabled a couple of the items. Therefore, only 9 items are enabled on the host.

    Here is the JSON query I am using:
    $jsonData = array('jsonrpc' => '2.0', 'method' => 'item.get', 'params' => array('output' => 'extend', 'host' => $hostname), 'id' => '1', 'auth' => $authtoken);

    When I perform a json item.get call, I am returned all 12 items in an array. All items have a state set to 0, because that is the state of the item in the template itself, and not of the state of the item on the host.

    Am I doing something wrong? I want to know the state of the item on the host, not the state of the item in the template.
  • bturnbough
    Member
    • Mar 2011
    • 70

    #2
    **bump**

    **BUMP**

    Can anyone please comment on the API's ability to return the status of items on a host that were inherited from a template?

    Again, I have 12 items in a template. All 12 items are enabled within the template. The template is applied to a host. Within the HOST, 3 of the 12 items are **DISABLED**. I need a way to return the status of the items on the host. Currently, item.get returns the status of the items of the TEMPLATE.

    Comment

    • tsalle
      Member
      Zabbix Certified Specialist
      • Oct 2012
      • 79

      #3
      Hi,

      Have you tried to fetch a host from the host.get method, with the selectItems parameter ?

      Comment

      Working...