Ad Widget

Collapse

API - Get Event Duration

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • insertcoin
    Junior Member
    • Jan 2014
    • 16

    #1

    API - Get Event Duration

    Hi,

    Been looking through the API documentation and I can't see a way to clearly get the duration of an event, the same as shown on the events.php page.

    Any ideas how I can get this value?

    I am aiming to get the duration of a trigger and if over x minutes without being acknowledged to add it to my internal KPI log.

    Therefore I need events that meet the criteria:

    Duration: >20 Minutes
    Status: PROBLEM
    Severity: ANY
  • insertcoin
    Junior Member
    • Jan 2014
    • 16

    #2
    Bump.

    I have had a look at the events.php file to try and figure out a method to obtain this data but its proving tricky.

    Any possible way to get it via the API?

    Comment

    • FabrizioA
      Member
      • Sep 2015
      • 33

      #3
      I'm interested too.
      Can API help us?

      Comment

      • insertcoin
        Junior Member
        • Jan 2014
        • 16

        #4
        I a having trouble posting the code, but I did manage to figure this out producing the following result:



        I have contacted the administrator to find out why I can't post my code, it keeps saying there are too many live/image links!

        Comment

        • FabrizioA
          Member
          • Sep 2015
          • 33

          #5
          Thank you @insertcoin.
          I think your solution is to use some languages like php/python/javascript to calculate the diff time from one problem event to his ok event time...
          I would need to have it with a simple API call or any SQL query execute on the Zabbix DB.
          Last edited by FabrizioA; 16-05-2016, 16:37.

          Comment

          • Ваэль
            Junior Member
            • Mar 2016
            • 1

            #6
            Thank you @insertcoin

            Could you send me the code on Email ??

            Comment

            • rsterenb
              Member
              • Apr 2015
              • 31

              #7
              Actually, I've been looking to use the API too to generate some things and encountered some issues while doing so. I'm interested in the code as well. If you cannot post the code on this forum, would GitHub be an appropriate place where you can share it?

              Comment

              Working...