Ad Widget

Collapse

Relation between Events, Triggers and Alerts using API

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • mvpramod022
    Junior Member
    • Mar 2016
    • 3

    #1

    Relation between Events, Triggers and Alerts using API

    Hi,

    i am using Zabbix 3.0 for monitoring my network and need to integrate it with a ticketing tool .

    I am trying to get all active alert details like severity, ack status, last change, name, host, alert status.Please help me to get the relation between Events, Triggers and Alerts using API.

    I am using the alert.get, event.get and trigger.get but unable to correlate them.

    Kindly assist.

    Regards,
    Pramod
  • pradeep.vempati
    Junior Member
    • Nov 2016
    • 2

    #2
    Hi Pramod,

    Get the hostid from host.get (you will get host name also here) and pass it to trigger.get with status as 0 (only active triggers), you will get triggerids (with this action you will receive Last change,severity ) and pass the triggerid to event.get and integrate the eventid to your ticketing tool and retrieve ticketid, using event.acknowledge acknowledge the ticket.

    Have a great day..

    Thanks,
    Pradeep V

    Comment

    • vkabakov
      Junior Member
      • Jan 2017
      • 5

      #3
      Hi,
      I have the exact same question, but after a whole day looking into the API docs and the actual mysql tables/calls, I am getting closer.

      However using the API 'event.get' , I do not see anything related to the current status/severity or things like this. The only information I have is :

      ...
      "result":[{
      "eventid":"78",
      "source":"0",
      "object":"0",
      "objectid":"13569",
      "clock":"1484944832",
      "value":"1",
      "acknowledged":"0",
      "ns":"13595112",
      "r_eventid":"0",
      "c_eventid":"0",
      "correlationid":"0",
      "userid":"0",
      "tags":[]}
      ...


      For now the only thing that it makes sense is that 'r_eventid' is NULL if there is a problem. So can you help my guys from where I can find the current state of a trigger ? What am I missing here ?

      Thanks a lot.

      Comment

      • vkabakov
        Junior Member
        • Jan 2017
        • 5

        #4
        Never mind. I found the answer...



        It is the 'value' field from the event.Its meaning is :

        "Possible values for trigger events:
        0 - OK;
        1 - problem. "

        Comment

        • vlam
          Senior Member
          Zabbix Certified Specialist
          • Jun 2009
          • 166

          #5
          Originally posted by vkabakov
          Never mind. I found the answer...



          It is the 'value' field from the event.Its meaning is :

          "Possible values for trigger events:
          0 - OK;
          1 - problem. "


          Hi vkabakov

          Have you got this to work as I have an issue where one of my clients that uses BMC ITSM wants there Zabbix environment that is currently integrated through email to change to do it through the API.
          Can you perhaps share what you did to get this working and if possible the output of how the API call should look.
          4 Zabbix Frontend Servers (Load balanced)
          2 Zabbix App Servers (HA)
          2 Zabbix Database Servers (HA)
          18 Zabbix Proxy Servers (HA)
          3897 Deployed Zabbix Agents
          6161 Values per second
          X-Layer Integration
          Jaspersoft report Servers (HA)

          Comment

          Working...