Ad Widget

Collapse

Zabbix API, filter --> Regex?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • gleepwurp
    Senior Member
    • Mar 2014
    • 119

    #1

    Zabbix API, filter --> Regex?

    Hello,

    I'm trying to get a list of all items that are currently in error. That is to say that the "error" property in the ITEM object is not empty.

    The filter allows for positive matching of letters/words, but does it allow for regular expression, or to select any "error" item property that is "not empty"?

    Thanks!

    G.
  • filipp.sudanov
    Senior Member
    Zabbix Certified Specialist
    • May 2014
    • 137

    #2
    Items have the following property:

    state integer (readonly) State of the item.
    Possible values:
    0 - (default) normal;
    1 - not supported.

    "not supported" actually means, that the item is in error state. So someting like this should do the trick:

    Code:
       "method": "item.get",
       "params": {
          "output": "extend",
          "filter": {
              "state": 1
          }
       },

    Comment

    • gleepwurp
      Senior Member
      • Mar 2014
      • 119

      #3
      Ahhh, I see!

      I'll give it a try, thank you!

      G.

      Comment

      • gleepwurp
        Senior Member
        • Mar 2014
        • 119

        #4
        Wonderful!

        Exactly what I needed, thanks again!

        G.

        Comment

        Working...