Ad Widget

Collapse

API Woes - Not all items returned

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • acarr
    Junior Member
    • Apr 2012
    • 11

    #1

    API Woes - Not all items returned

    Hi,

    I'm struggling to get to grips with the API.
    I want to write some scripts to scape data out of Zabbix to feed custom graphs and monitoring screens and I have tried both the PHP library and the Mozaby jQuery plugin but I'm not getting results I would expect.

    I'm feeding in queries with hostids of systems that Zabbix is monitoring (I'm pulling the hostids straight out of the urls from the Zabbix pages) and I am either not getting any data or I am getting partial data back, i.e. from only a selection the monitored items.

    The same happens when I specify to receive only the items, some items will work, others just return nothing when I'd expect data back.

    Is anyone able to explain how why this might be happening and I retrieve all of the records that I want or just how to debug the API calls.

    Many Thanks.
  • acarr
    Junior Member
    • Apr 2012
    • 11

    #2
    Scratch that.

    I've figured it out, the documentation wasn't particularly clear to me.

    I needed to set the History parameter on my history.get, with an item type, which is listed at http://www.zabbix.com/documentation/1.8/api/item under Value types:

    Value Type
    0 Numeric (float)
    1 Character
    2 Log
    3 Numeric (unsigned)
    4 Text

    Bang in the correct digit and I'm getting the results I expect.

    Comment

    Working...