Ad Widget

Collapse

Web scenario, Regex and multiple lines

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • simonc
    Member
    • Jul 2009
    • 73

    #1

    Web scenario, Regex and multiple lines

    Hi all,

    I'm trying to find the correct regular expression for my scenario.
    In fact, I'd like to find two groups of words in my webpage : for example "Copyright 2001-2009" and "Connected as".
    If i don't get this two groups -> trigger is ON.

    I don't understand how Zabbix works over multiples lines for regex...

    I tried that without success :
    /(Copyright 2001-2009).*(^.*$)*.*(Connected as)/sm

    Someone had already set up such a regex?

    Thanks
    Simon
    Last edited by simonc; 14-12-2009, 12:39.
  • simonc
    Member
    • Jul 2009
    • 73

    #2
    Ok, this one is working on Zabbix 1.6.7 :

    (Copyright 2001.*$)(\s.*)*(Connected as)

    But doesn't work on Zabbix 1.6.4... i don't know why.

    Comment

    • kokomo
      Junior Member
      • Apr 2010
      • 16

      #3
      How?

      Hi simonc,

      I am curious where you added the regex and trigger. Could you possibly show me?
      Last edited by kokomo; 22-04-2010, 04:49.

      Comment

      • simonc
        Member
        • Jul 2009
        • 73

        #4
        You should put the regex on the field : "Required" in the page : "Step of scenario".

        Comment

        • kokomo
          Junior Member
          • Apr 2010
          • 16

          #5
          Thank you. What about trigger? How do you make it?

          Comment

          • simonc
            Member
            • Jul 2009
            • 73

            #6
            It's very simple, please take a look at this doc :
            http://www.zabbix.com/documentation/...o?s[]=scenario

            Comment

            • kokomo
              Junior Member
              • Apr 2010
              • 16

              #7
              what about trigger though? Where do you check the output of regexp?

              Comment

              Working...