[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Matching URL content against regular expression
From: |
Gonzalez, Fernando (FOM) |
Subject: |
Matching URL content against regular expression |
Date: |
Thu, 24 Jul 2014 11:29:28 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.0 |
Hi, I am trying to get monit to check a URL and verify the content with
a regular expression. For that I use this configuration:
CHECK HOST fergonco WITH ADDRESS fergonco.es
if failed
port 80 protocol http
and request /tmp/a with content = "ab"
then alert
If I remove the "with content" part I get the report is ok, but when I
put it says "connection failed" and in the log I get this:
[CEST Jun 10 21:31:00] error : 'fergonco' failed protocol test [HTTP]
at INET[fergonco.es:80/tmp/a] via TCP -- HTTP error: Regular expression
doesn't match: No match
I am trying to access a file that contains just "abccc", I know what a
regular expression is and I have tried many combinations. Still, I must
be doing some silly mistake. I have searched the mailing list and
existing documentation with no luck. Any help would be appreciated.
Regards.
- Matching URL content against regular expression,
Gonzalez, Fernando (FOM) <=