Ad Widget

Collapse

API: trigger "status" and "value" - what do they mean?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Guest

    #1

    API: trigger "status" and "value" - what do they mean?

    Hi guys,

    I was trying to use the provided API function trigger.get to get the Status about the currently active triggers. But now I got a problem interpreting the answer returned by the server. If I search for every trigger on a specific host having "swap" inside its description, this is what I get:

    Code:
    {
      "jsonrpc":"2.0",
      "result":[
        {
          "triggerid":"14768",
          "expression":"({TRIGGER.VALUE}=0&{27184}<66)|({TRIGGER.VALUE}=1&{27184}<75)",
          "description":"{HOSTNAME}: Free swap is below normal",
          "url":"",
          "status":"1",
          "value":"2",
          "priority":"3",
          "lastchange":"1285017207",
          "dep_level":"0",
          "comments":"",
           "error":"",
          "templateid":"12229",
          "type":"0"
        },
        {
          "triggerid":"14769",
          "expression":"({TRIGGER.VALUE}=0&{27044}<50)|({TRIGGER.VALUE}=1&{27044}<60)",
          "description":"{HOSTNAME}: Free swap is critical",
          "url":"",
          "status":"0",
          "value":"1",
          "priority":"4",
          "lastchange":"1306370747",
          "dep_level":"1",
          "comments":"",
          "error":"",
          "templateid":"12440",
          "type":"0"
        },
        {
          "triggerid":"14767",
          "expression":"({TRIGGER.VALUE}=0&{27114}<33)|({TRIGGER.VALUE}=1&{27114}<45)",
          "description":"{HOSTNAME}: Free swap is extremely critical",
          "url":"",
          "status":"0",
          "value":"0",
          "priority":"5",
          "lastchange":"1306382655",
          "dep_level":"1",
          "comments":"",
          "error":"",
          "templateid":"12421",
          "type":"0"
        }
      ],
      "id":2
    }
    In this example status obviously may have a status of 0 and 1. Value on the other hand goes from 0 to 2. So what do these values stand for?

    And how do I find out about the dependencies of these triggers? I see the property "dep_level", of course. But how exactly do I find out the depending trigger?

    I hope anybody may have an idea.

    mh166
    Last edited by Guest; 28-05-2011, 22:06.
  • zabbix_zen
    Senior Member
    • Jul 2009
    • 426

    #2
    Check Status types and Value types mapping here

    Comment

    Working...