Ad Widget

Collapse

Using API to pull all triggers over last 24hrs

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Vedmak
    Member
    • Feb 2009
    • 34

    #16
    dev branches are in svn://svn.zabbix.com/branches/dev you can find what you need by bug report number.
    later when the fix is tested, changes will be merged into 1.8 branch and trunk, and dev branch will be deleted.

    btw. ticket is "resolved", means fixed but not tested, when "closed" then fix merged to main branches

    Comment

    • obrienmd
      Junior Member
      • Jul 2010
      • 26

      #17
      Ah, I see! So, given that the branch does not contain a simple patch file to apply, what do I do with the files in said dev branch? Sorry for the newb questions

      Comment

      • obrienmd
        Junior Member
        • Jul 2010
        • 26

        #18
        OK, using latest trunk I'm now able to get events, and filter by "hostids". When I pull all events for a given hostid, I get something looking like the following. Any ideas on how I can take this and get a nice list like:
        ---
        Time: Triggername: OK
        Time: Triggername: Problem
        ---
        Thanks!

        Array ( [0] => Array ( [hosts] => Array ( [0] => Array ( [hostid] => 10048 ) ) [eventid] => 217620 ) [1] => Array ( [hosts] => Array ( [0] => Array ( [hostid] => 10048 ) ) [eventid] => 217622 ) [2] => Array ( [hosts] => Array ( [0] => Array ( [hostid] => 10048 ) ) [eventid] => 217624 ) [3] => Array ( [hosts] => Array ( [0] => Array ( [hostid] => 10048 ) ) [eventid] => 217625 ) [4] => Array ( [hosts] => Array ( [0] => Array ( [hostid] => 10048 ) ) [eventid] => 217626 ) [5] => Array ( [hosts] => Array ( [0] => Array ( [hostid] => 10048 ) ) [eventid] => 217627 ) [6] => Array ( [hosts] => Array ( [0] => Array ( [hostid] => 10048 ) ) [eventid] => 217628 ) [7] => Array ( [hosts] => Array ( [0] => Array ( [hostid] => 10048 ) ) [eventid] => 217629 ) [8] => Array ( [hosts] => Array ( [0] => Array ( [hostid] => 10048 ) ) [eventid] => 217630 ) [9] => Array ( [hosts] => Array ( [0] => Array ( [hostid] => 10048 ) ) [eventid] => 217631 ) [10] => Array ( [hosts] => Array ( [0] => Array ( [hostid] => 10048 ) ) [eventid] => 217632 )

        Comment

        • obrienmd
          Junior Member
          • Jul 2010
          • 26

          #19
          Nobody on this one? API doesn't seem to be super well-documented in current 1.8 docs...

          Comment

          Working...