Changeset 73df43f30ea0b1c5c1d75c98793bf57712b99d72

Show
Ignore:
Timestamp:
08/15/10 21:51:01 (4 years ago)
Author:
Theo Schlossnagle <jesus@omniti.com>
git-committer:
Theo Schlossnagle <jesus@omniti.com> 1281909061 +0000
git-parent:

[f365f5006a76043da0acd0ad09ecb7fd98f0d740]

git-author:
Theo Schlossnagle <jesus@omniti.com> 1281909061 +0000
Message:

use http to test out the new pcre_match_limit stuff and give it a sane default, fixes #306

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • src/modules-lua/noit/module/http.lua

    r8d08f77 r73df43f  
    8888               required="optional" 
    8989               allowed=".+">This regular expression is matched against the body of the response globally.  The first capturing match is the key and the second capturing match is the value.  Each key/value extracted is registered as a metric for the check.</parameter> 
     90    <parameter name="pcre_match_limit" 
     91               required="optional" 
     92               default="10000" 
     93               allowed="\d+">This sets the PCRE internal match limit (see pcreapi documentation).</parameter> 
    9094  </checkconfig> 
    9195  <examples> 
     
    264268    local method = check.config.method or "GET" 
    265269    local max_len = 80 
     270    local pcre_match_limit = check.config.pcre_match_limit or 10000 
    266271    local redirects = check.config.redirects or 0 
    267272 
     
    454459      local rv = true 
    455460      while rv do 
    456         rv, m, key, value = exre(output or ''
     461        rv, m, key, value = exre(output or '', { limit = pcre_match_limit }
    457462        if rv and key ~= nil then 
    458463          check.metric(key, value)