Changeset e520e98b8f3e66fdfa978ec0f096baad8a7dfb38

Show
Ignore:
Timestamp:
11/01/11 00:44:52 (3 years ago)
Author:
Theo Schlossnagle <jesus@lethargy.org>
git-committer:
Theo Schlossnagle <jesus@lethargy.org> 1320108292 -0700
git-parent:

[3c0b5cfefa3533bd9495cecbb70b5fd9d5250390], [895f8f377833cef214643a6ff35c402fd6835a25]

git-author:
Theo Schlossnagle <jesus@lethargy.org> 1320108292 -0700
Message:

Merge pull request #27 from Kami/include_body_http_check_option

Add 'include_body' option to the HTTP check

Files:

Legend:

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

    r608552c re520e98  
    9292               default="10000" 
    9393               allowed="\d+">This sets the PCRE internal match limit (see pcreapi documentation).</parameter> 
     94    <parameter name="include_body" 
     95               required="optional" 
     96               allowed="^(?:true|false|on|off)$" 
     97               default="false" 
     98               allowed="\d+">Include whole response body as a metric with the key 'body'.</parameter> 
     99 
    94100  </checkconfig> 
    95101  <examples> 
     
    270276    local pcre_match_limit = check.config.pcre_match_limit or 10000 
    271277    local redirects = check.config.redirects or 0 
     278    local include_body = false 
    272279 
    273280    -- expect the worst 
     
    294301    if schema == 'https' then 
    295302        use_ssl = true 
     303    end 
     304 
     305    -- Include body as a metric 
     306    if check.config.include_body == "true" or check.config.include_body == "on" then 
     307        include_body = true 
    296308    end 
    297309 
     
    487499    end 
    488500 
     501    -- Include body 
     502    if include_body then 
     503        check.metric_string('body', output or '') 
     504    end 
     505 
    489506    -- ssl ctx 
    490507    local ssl_ctx = client:ssl_ctx()