Ad Widget

Collapse

Web monitoring: Underscore (_) makes the regular expression always fail. Or does it?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Speque
    Junior Member
    • Jul 2010
    • 2

    #1

    Web monitoring: Underscore (_) makes the regular expression always fail. Or does it?

    Hello everyone.

    I have a very mysterious problem with Zabbix web monitoring and using regular expressions to check fetched content.

    I have a web check scenario with one step and that step includes fetching an HTML-page and checking for its contents. The only that the fetched file contains is the text

    Code:
    HTML_JSP
    and nothing else. I then try to match it with a regular expression pattern

    Code:
    ^HTML_JSP$
    but the test always fails. If I change the test to for example

    Code:
    ^HTML
    it works fine, but for example these do not:

    Code:
    ^HTML_ , ^HTML_JSP , ^HTML.JSP , HTML_JSP , JSP$
    On the other hand I have similar test with files containing

    Code:
    OK
    and patterns

    Code:
    ^OK$
    and they work fine.

    It seems that the underscore is the source of the problems, but how can it be??? Unfortunately I have to check for that exact string and I cannot change that.

    Anyone having an idea what is going on? Or if someone of you has some web checks working, could you try if that underscore really is the problem, or if I'm just having some weird personal penalty.

    With kind regards

    Pekka

    a new and confused Zabbix user
  • Speque
    Junior Member
    • Jul 2010
    • 2

    #2
    Oh, I completely forgot: the version I'm using is 1.4.6. (from Debian repository).

    Comment

    Working...