Ad Widget

Collapse

Regex in LLD filters

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • rjurek
    Junior Member
    • Dec 2014
    • 15

    #1

    Regex in LLD filters

    I am discovery network interfaces and I only want to get the interfaces that have text in IfDescr. I have tried a few combination of regex in the filter, but not sure of the syntax that it takes. my filter is
    Label Macro = {#IFDESCR} matches Regular expression = "^\s*\S" and the result is no interfaces.

    Thanks
  • Markku
    Senior Member
    Zabbix Certified SpecialistZabbix Certified ProfessionalZabbix Certified Expert
    • Sep 2018
    • 1781

    #2
    Hi, how about regex:

    .+

    Meaning: any character (.), one or more times (+)

    Alternatively, using ”does not match” logic:

    ˆ$

    Meaning empty line (string)

    (provided that #IFDESCR is properly populated of course)

    Markku

    Comment

    • rjurek
      Junior Member
      • Dec 2014
      • 15

      #3
      thanks Markku, the .+ worked.

      Comment

      Working...