Ad Widget

Collapse

Zabbix 2.4 - LLD Multiple filters on SNMP Interfaces

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ggiesen
    Junior Member
    • Jan 2009
    • 7

    #1

    Zabbix 2.4 - LLD Multiple filters on SNMP Interfaces

    I'm having a hard time wrapping my head around a problem (maybe I'm taking the wrong approach).

    I'd like to modify the standard "Template SNMP Interfaces" Discovery rule so that I can filter on both the ifName and ifOperStatus.

    So if either of the filters matched (ifName matches a regex for a list of ifNames) or ifOperStatus is equal to 6 (notPresent), the interface would be excluded from discovery.

    I've been able to create the regex, but I don't know what to put in the Macro field of the filter (B in attached screenshot) to match on ifOperStatus. Can someone point me in the right direction? Or is what I want not possible?
    Attached Files
  • kloczek
    Senior Member
    • Jun 2006
    • 1771

    #2
    Originally posted by ggiesen
    I've been able to create the regex, but I don't know what to put in the Macro field of the filter (B in attached screenshot) to match on ifOperStatus. Can someone point me in the right direction? Or is what I want not possible?
    That depends on fields of the records in your input json data in discovery rule.
    http://uk.linkedin.com/pub/tomasz-k%...zko/6/940/430/
    https://kloczek.wordpress.com/
    zapish - Zabbix API SHell binding https://github.com/kloczek/zapish
    My zabbix templates https://github.com/kloczek/zabbix-templates

    Comment

    • almirf
      Junior Member
      • Sep 2015
      • 29

      #3
      Dear friend

      You find the soluto tô filter ifoperstatus ?????

      Thanks
      Almir

      Originally posted by ggiesen
      I'm having a hard time wrapping my head around a problem (maybe I'm taking the wrong approach).

      I'd like to modify the standard "Template SNMP Interfaces" Discovery rule so that I can filter on both the ifName and ifOperStatus.

      So if either of the filters matched (ifName matches a regex for a list of ifNames) or ifOperStatus is equal to 6 (notPresent), the interface would be excluded from discovery.

      I've been able to create the regex, but I don't know what to put in the Macro field of the filter (B in attached screenshot) to match on ifOperStatus. Can someone point me in the right direction? Or is what I want not possible?

      Comment

      • Linwood
        Senior Member
        • Dec 2013
        • 398

        #4
        As I understand it you can't do this in the base product before version 3 (still in Alpha).

        There are some "extended SNMP discovery" examples and various similar phrases people have done using external checks, but the current discovery rule will only filter on the specific value specified in the discovery OID.

        It's not too hard to write external checks to do the same, at least after the first one and getting all the syntax straight. Starting with one of the contributed examples is a good idea.

        Comment

        Working...