monit-general
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Check a string in a web page of more than 256 bytes


From: Jan-Henrik Haukeland
Subject: Re: Check a string in a web page of more than 256 bytes
Date: Tue, 4 Jul 2006 14:10:28 +0200


On 4. jul. 2006, at 13.27, David Llanos wrote:

is there a possibility to check (with the SEND/EXPECT schema) if a determined string is inside a web page, although it is not in the first 256 Bytes of the page???

No, send/expect is limited to testing the first 256 bytes. However you can use the url test to check for up to 1 MB of content in a web page. From the manual: Testing the content returned by the server is optional. If used, you can test if the content match or does not match a regular expression. Here's an example on how the URL statement can be used in a check service:

 check host FOO with address www.foo.bar
      if failed url
         http://user:address@hidden:8080/?querystring
         and content == 'action="j_security_check"'
      then ...
Monit will look at the content-length header returned by the server and download this amount before testing the content. That is, if the content-length is more than 1Mb or this header is not set by the server monit will default to download up to 1 Mb and not more.

Only the http(s) protocol is supported in an URL statement. If the protocol is https monit will use SSL when connecting to the server.








reply via email to

[Prev in Thread] Current Thread [Next in Thread]