Ad Widget

Collapse

Get Problems through Zabbix API, but unable to link them to Hosts

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • bganichaud
    Junior Member
    • Feb 2023
    • 1

    #1

    Get Problems through Zabbix API, but unable to link them to Hosts

    Hello,

    I would like to use API to get information problems from zabbix.
    I can get problem list, and also host list, but I don't know how to link problems to hosts.
    Do you know il I can use API methods to do the relation between those 2 information?
    Thank you.

    Regards.
  • LenR
    Senior Member
    • Sep 2009
    • 1005

    #2
    Just looking at the API reference, I haven't tested: The problem has object and objectid fields, using triggers for the object (value is 0) then the object id is a trigger, so you would use it in trigger.get. Add selectItems to the trigger get so you don't have to parse the expression. The item(s) will include a hostid field of the related host.

    Looking at things like this makes us appreciate just how responsive the frontend is with all this in the background :-)

    Comment

    Working...