Ad Widget

Collapse

Use selectLastEvent to Retrieve acknowledgements?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • russell
    Junior Member
    • Dec 2015
    • 2

    #1

    Use selectLastEvent to Retrieve acknowledgements?

    I'm not sure if this is possible, and haven't had much luck with it...

    I'm using Dashing as dashboard and Zabby for the API integration (started with the following: https://github.com/tolleiv/dashing-zabbix) . Currently using Zabbix 2.4.7.

    I use the following in the running job to get the trigger information for problem triggers:

    Zabby::Trigger.get(
    'filter' => { 'priority' => states.keys },
    'output' => 'extend',
    'only_true' => 'true',
    'monitored' => 1,
    'selectItems' => 1,
    'skipDependent' => 1,
    'expandDescription' => 1,
    'expandData' => 'host'
    )

    However, I haven't had any luck in adding 'selectLastEvent' to grab more than the eventid. It seems selectLastEvent is similar to an event.get, but I can't specify 'select_acknowledges' in order to retrieve the message field for the most recent acknowledgement.

    Anyone who might be able to point me in the right direction on this?
  • russell
    Junior Member
    • Dec 2015
    • 2

    #2
    Looks like the best way to do this is to use 'selectLastEvent' to get the eventid for the last status change of each trigger.

    From there, event.get with 'select_acknowledges' to get to the 'message' field that I need, then merge the data using the eventid for each.

    I'll update this when I have it working if anyone is interested in using their Dashing dashboard to display problem status triggers with their most recent acknowledgement messages. If anyone has a simpler way to do this (or can point to the best way accomplish both api calls and the merging of the output), let me know.

    Thanks!

    Comment

    Working...