Changeset 895f8f377833cef214643a6ff35c402fd6835a25

Show
Ignore:
Timestamp:
10/31/11 22:20:02 (2 years ago)
Author:
Tomaz Muraus <tomaz@tomaz.me>
git-committer:
Tomaz Muraus <tomaz@tomaz.me> 1320099602 +0100
git-parent:

[51b2a89650aa59a060f72e44e0936e37650c04d6]

git-author:
Tomaz Muraus <tomaz@tomaz.me> 1320099602 +0100
Message:

Add 'include_body' option.

Files:

Legend:

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

    ra24b166 r895f8f3  
    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 
     
    486498    end 
    487499 
     500    -- Include body 
     501    if include_body then 
     502        check.metric_string('body', output or '') 
     503    end 
     504 
    488505    -- ssl ctx 
    489506    local ssl_ctx = client:ssl_ctx()