Changeset 5229ef1f0c47697846621aa99c2b3836b192a769
- Timestamp:
- 02/04/08 20:05:24
(5 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
| ra2e53dc |
r5229ef1 |
|
| 107 | 107 | static int serf_config(noit_module_t *self, noit_hash_table *options) { |
|---|
| 108 | 108 | 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)); |
|---|
| 110 | 118 | conf->options = options; |
|---|
| 111 | 119 | conf->results = serf_log_results; |
|---|
| … | … | |
| 115 | 123 | static int resmon_config(noit_module_t *self, noit_hash_table *options) { |
|---|
| 116 | 124 | 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)); |
|---|
| 118 | 134 | conf->options = options; |
|---|
| 119 | 135 | if(!conf->options) conf->options = calloc(1, sizeof(*conf->options)); |
|---|
| … | … | |
| 161 | 177 | current.status = human_buffer; |
|---|
| 162 | 178 | if(current.available == NP_AVAILABLE) { |
|---|
| 163 | | noit_stats_set_metric_int(¤t, "code", &ci->status.code); |
|---|
| | 179 | noit_stats_set_metric_string(¤t, "code", ci->status.code?code:NULL); |
|---|
| 164 | 180 | noit_stats_set_metric_int(¤t, "bytes", &ci->body.l); |
|---|
| 165 | 181 | } |
|---|
| … | … | |
| 688 | 704 | |
|---|
| 689 | 705 | 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); |
|---|
| 691 | 707 | ci->handler_ctx.path = ci->url.path; |
|---|
| 692 | 708 | ci->handler_ctx.authn = NULL; |
|---|
| r7cdd67a |
r5229ef1 |
|
| 59 | 59 | </config> |
|---|
| 60 | 60 | </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> |
|---|
| 61 | 68 | </checkgroup> |
|---|
| 62 | 69 | <checkgroup> |
|---|