Ad Widget

Collapse

Macro/Regex Filter for LLD not working

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Steveo
    Member
    • Jun 2013
    • 31

    #1

    Macro/Regex Filter for LLD not working

    I currently have several regex filters configured for interface discovery and haven't had any issues. I created a new one that was a bit more complex and it seems that one is being ignored when applied to a LLD template.

    What I am trying to accomplish is to ignore any interface named Ont XXXX/gY, where XXXX is any number 1-4 digits and Y is 2, 3 or 4. I tried the following regular expressions and they work fine in my regex analyzer and in the built in Zabbix tester, but not when applied to {#SNMPVALUE} macro in my template.

    ^Ont \d+\/g[2-4]$
    ^Ont \d+\/g(2|3|4)$


    If I change the regex to just ^Ont, it works fine and ignores every interface beginning with Ont. See below for an example of what I need to discover:

    Ont 1001/g1 = Yes
    Ont 1001/g2 = No
    Ont 1001/g3 = No
    Ont 1001/g4 = No

    I am seeing the same behavior in 2.06 and 2.41, anyone have any ideas, or suggestions?

    Thanks,
    Steveo
    Last edited by Steveo; 09-07-2015, 16:55.
  • Steveo
    Member
    • Jun 2013
    • 31

    #2
    I ended up having to create 4 separate regular expressions that did not use "/d+" to match the digits to actually get it working. I am not sure why either of the other 2 did not work with the filter, they both match the same patterns as the 4 I ended up using.


    ^Ont [0-9][0-9][0-9][0-9]\/g[2-4]$
    ^Ont [0-9][0-9][0-9]\/g[2-4]$
    ^Ont [0-9][0-9]\/g[2-4]$
    ^Ont [0-9]\/g[2-4]$
    Last edited by Steveo; 10-07-2015, 21:05.

    Comment

    Working...