Ad Widget

Collapse

Question about "Global" Regex's

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • danrog
    Senior Member
    • Sep 2009
    • 164

    #1

    Question about "Global" Regex's

    I haven't found too much info on the regex's you can enter under Admin -> General -> Regexp's so I thought I'd ask here. The documentation states ".. it can be used everywhere regular expressions are supported by referring to it's name, prefixed with @, for example, @mycustomregexp." however, it doesn't seem to work with the item web.page.regexp. Are these global regex's only meant to be used with triggers?

    Here is an example:

    Code:
    web.page.regexp[server,/path/monitor.display,8080,@SmokeTest]
  • richlv
    Senior Member
    Zabbix Certified Trainer
    Zabbix Certified SpecialistZabbix Certified Professional
    • Oct 2005
    • 3112

    #2
    could you please report this on the tracker ?
    thanks
    Zabbix 3.0 Network Monitoring book

    Comment

    • danrog
      Senior Member
      • Sep 2009
      • 164

      #3
      Will do, I just didn't want to do that first in case it was expected behavior and not supported.

      Comment

      • lukemacneil
        Junior Member
        • Jun 2011
        • 12

        #4
        Same for log items. I'm having the same problem with 1.8.5
        Did you ever find a workaround for this?

        Comment

        • simon123
          Junior Member
          • Oct 2010
          • 22

          #5
          @prefix doesn't work with macro's either

          I would like to see this feature better documented as well, the @prefix doesn't seem to be accepted when combined with macro's either

          Code:
          Incorrect trigger expression format " {constant}>{constant} & {constant} = @PublicIP "
          Check expression part starting from " {C_Template_SNMPv2_Interfaces14:ifInOctets.14.last(0)}>{$MAXIN} & {$IF14} = @PublicIP "
          ({$IF14} being the ip address of the interface)

          EDIT:

          I worked around this issue by querying for the IP-adr instead of using the one i have stored in a macro.

          Code:
          {C_Template_SNMPv2_Interfaces11:IPAdrEntIP.11.regexp(@PublicIP)}
          This works like a charm though

          Maybe the regexp on macro's could be supported in triggers in a future release...
          Last edited by simon123; 27-07-2011, 14:51.

          Comment

          • richlv
            Senior Member
            Zabbix Certified Trainer
            Zabbix Certified SpecialistZabbix Certified Professional
            • Oct 2005
            • 3112

            #6
            trigger functions may only return numbers, as per manual, thus comparing two textual values is not possible at this time (as far as i know )
            Zabbix 3.0 Network Monitoring book

            Comment

            Working...