Changeset 5229ef1f0c47697846621aa99c2b3836b192a769

Show
Ignore:
Timestamp:
02/04/08 20:05:24 (7 years ago)
Author:
Theo Schlossnagle <jesus@omniti.com>
git-committer:
Theo Schlossnagle <jesus@omniti.com> 1202155524 +0000
git-parent:

[a2e53dc0c9ff0d9e50eb095b926924850a6c8ff8]

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

use the correct Host:

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • src/modules/http.c

    ra2e53dc r5229ef1  
    107107static int serf_config(noit_module_t *self, noit_hash_table *options) { 
    108108  serf_module_conf_t *conf; 
    109   conf = calloc(1, sizeof(*conf)); 
     109  conf = noit_module_get_userdata(self); 
     110  if(conf) { 
     111    if(conf->options) { 
     112      noit_hash_destroy(conf->options, free, free); 
     113      free(conf->options); 
     114    } 
     115  } 
     116  else 
     117    conf = calloc(1, sizeof(*conf)); 
    110118  conf->options = options; 
    111119  conf->results = serf_log_results; 
     
    115123static int resmon_config(noit_module_t *self, noit_hash_table *options) { 
    116124  serf_module_conf_t *conf; 
    117   conf = calloc(1, sizeof(*conf)); 
     125  conf = noit_module_get_userdata(self); 
     126  if(conf) { 
     127    if(conf->options) { 
     128      noit_hash_destroy(conf->options, free, free); 
     129      free(conf->options); 
     130    } 
     131  } 
     132  else 
     133    conf = calloc(1, sizeof(*conf)); 
    118134  conf->options = options; 
    119135  if(!conf->options) conf->options = calloc(1, sizeof(*conf->options)); 
     
    161177  current.status = human_buffer; 
    162178  if(current.available == NP_AVAILABLE) { 
    163     noit_stats_set_metric_int(&current, "code", &ci->status.code); 
     179    noit_stats_set_metric_string(&current, "code", ci->status.code?code:NULL); 
    164180    noit_stats_set_metric_int(&current, "bytes", &ci->body.l); 
    165181  } 
     
    688704 
    689705  ci->handler_ctx.method = apr_pstrdup(ci->pool, "GET"); 
    690   ci->handler_ctx.host = apr_pstrdup(ci->pool, check->target); 
     706  ci->handler_ctx.host = apr_pstrdup(ci->pool, ci->url.hostname); 
    691707  ci->handler_ctx.path = ci->url.path; 
    692708  ci->handler_ctx.authn = NULL; 
  • src/sample.conf

    r7cdd67a r5229ef1  
    5959        </config> 
    6060      </check> 
     61      <check uuid="1b4e28ba-2fa1-11d2-883f-b9a761bde3ff"> 
     62        <target>8.8.38.59</target> 
     63        <config> 
     64          <url>https://taskman.omniti.com/</url> 
     65          <code>200</code> 
     66        </config> 
     67      </check> 
    6168    </checkgroup> 
    6269    <checkgroup>