Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Linux-HA: Users

Regex examples?

 

 

Linux-HA users RSS feed   Index | Next | Previous | View Threaded


nick at mobilia

Jul 1, 2008, 7:30 AM

Post #1 of 4 (135 views)
Permalink
Regex examples?

Does anyone have any examples, or resources for creating the regex to
use in the Apache OCF_REGKEY_testregex field?

I have written regexs before, but not in a situation like this...

What exactly does the OCF agent see, pure html correct?

If no regex is included, does it just look for a reply, any reply will do?

Thanks in advance, Nick
_______________________________________________
Linux-HA mailing list
Linux-HA[at]lists.linux-ha.org
http://lists.linux-ha.org/mailman/listinfo/linux-ha
See also: http://linux-ha.org/ReportingProblems


misch at multinet

Jul 1, 2008, 8:01 AM

Post #2 of 4 (127 views)
Permalink
Re: Regex examples? [In reply to]

----- Original Message -----
From: "Nick" <nick[at]mobilia.it>
To: "General Linux-HA mailing list" <linux-ha[at]lists.linux-ha.org>
Sent: Tuesday, July 01, 2008 4:30 PM
Subject: [Linux-HA] Regex examples?


> Does anyone have any examples, or resources for creating the regex to use
> in the Apache OCF_REGKEY_testregex field?
>
> I have written regexs before, but not in a situation like this...
>
> What exactly does the OCF agent see, pure html correct?
>
> If no regex is included, does it just look for a reply, any reply will do?
>
> Thanks in advance, Nick

Just open your website in a firefox and click CTRL-U (see page source code).
A regexp that always works is "body" wothout the ".

Michael.

_______________________________________________
Linux-HA mailing list
Linux-HA[at]lists.linux-ha.org
http://lists.linux-ha.org/mailman/listinfo/linux-ha
See also: http://linux-ha.org/ReportingProblems


Ralph.Grothe at itdz-berlin

Jul 1, 2008, 11:12 PM

Post #3 of 4 (115 views)
Permalink
RE: Regex examples? [In reply to]

Hi Michael,

sorry for intercepting this thread.

I only wanted to say hello,
as I am one of the participants of your HB2/LVS class held the week before Xmas last year at Heinlein.

Maybe as an apology a follow-on question on the subject.

Can Perl Compatible Regexes be used (i.e. is the libpcre or so involved?)
If I remember correctly, at least Apache relies on this lib.
For a Perl nerd this would be highly welcome.

Regards
Ralph

> -----Original Message-----
> From: linux-ha-bounces[at]lists.linux-ha.org
> [mailto:linux-ha-bounces[at]lists.linux-ha.org]On Behalf Of Michael
> Schwartzkopff
> Sent: Tuesday, July 01, 2008 5:02 PM
> To: General Linux-HA mailing list
> Subject: Re: [Linux-HA] Regex examples?
>
>
>
> ----- Original Message -----
> From: "Nick" <nick[at]mobilia.it>
> To: "General Linux-HA mailing list" <linux-ha[at]lists.linux-ha.org>
> Sent: Tuesday, July 01, 2008 4:30 PM
> Subject: [Linux-HA] Regex examples?
>
>
> > Does anyone have any examples, or resources for creating
> the regex to use
> > in the Apache OCF_REGKEY_testregex field?
> >
> > I have written regexs before, but not in a situation like this...
> >
> > What exactly does the OCF agent see, pure html correct?
> >
> > If no regex is included, does it just look for a reply, any
> reply will do?
> >
> > Thanks in advance, Nick
>
> Just open your website in a firefox and click CTRL-U (see
> page source code).
> A regexp that always works is "body" wothout the ".
>
> Michael.
>
> _______________________________________________
> Linux-HA mailing list
> Linux-HA[at]lists.linux-ha.org
> http://lists.linux-ha.org/mailman/listinfo/linux-ha
> See also: http://linux-ha.org/ReportingProblems
>
_______________________________________________
Linux-HA mailing list
Linux-HA[at]lists.linux-ha.org
http://lists.linux-ha.org/mailman/listinfo/linux-ha
See also: http://linux-ha.org/ReportingProblems


misch at multinet

Jul 2, 2008, 1:27 AM

Post #4 of 4 (114 views)
Permalink
Re: Regex examples? [In reply to]

Am Mittwoch, 2. Juli 2008 08:12 schrieb Ralph.Grothe[at]itdz-berlin.de:
> Hi Michael,
>
> sorry for intercepting this thread.
>
> I only wanted to say hello,
> as I am one of the participants of your HB2/LVS class held the week before
> Xmas last year at Heinlein.
>
> Maybe as an apology a follow-on question on the subject.
>
> Can Perl Compatible Regexes be used (i.e. is the libpcre or so involved?)
> If I remember correctly, at least Apache relies on this lib.
> For a Perl nerd this would be highly welcome.
>
> Regards
> Ralph

hi,

basically the according line in the apache OCF script is:
$WGET $WGETOPTS $STATUSURL | tr '\012' ' ' | grep -Ei \"$TESTREGEX\"

I dont know if grep likes the perl regexp, but just it a try. Also read man
grep.

If not, you still can rewrite this line in your personal apache OCF script.
The script is located in /usr/lib/ocf/resource.d/heartbeat/

Greetings,


--
Dr. Michael Schwartzkopff
MultiNET Services GmbH
Addresse: Bretonischer Ring 7; 85630 Grasbrunn; Germany
Tel: +49 - 89 - 45 69 11 0
Fax: +49 - 89 - 45 69 11 21
mob: +49 - 174 - 343 28 75

mail: misch[at]multinet.de
web: www.multinet.de

Sitz der Gesellschaft: 85630 Grasbrunn
Registergericht: Amtsgericht München HRB 114375
Geschäftsführer: Günter Jurgeneit, Hubert Martens

---

PGP Fingerprint: F919 3919 FF12 ED5A 2801 DEA6 AA77 57A4 EDD8 979B
Skype: misch42
_______________________________________________
Linux-HA mailing list
Linux-HA[at]lists.linux-ha.org
http://lists.linux-ha.org/mailman/listinfo/linux-ha
See also: http://linux-ha.org/ReportingProblems

Linux-HA users RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact lists@gossamer-threads.com
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.