Changeset 27bd35b5a3e6285c5119854280b9d30b9b869fdf
- Timestamp:
- 01/30/08 04:49:43
(10 years ago)
- Author:
- Theo Schlossnagle <jesus@omniti.com>
- git-committer:
- Theo Schlossnagle <jesus@omniti.com> 1201668583 +0000
- git-parent:
[d0917666cea8e5f782203cebb922a998c939dfa6]
- git-author:
- Theo Schlossnagle <jesus@omniti.com> 1201668583 +0000
- Message:
make options work in http checks
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
re3c8f10 |
r27bd35b |
|
86 | 86 | } |
---|
87 | 87 | static void serf_log_results(noit_module_t *self, noit_check_t check) { |
---|
| 88 | int expect_code = 200; |
---|
| 89 | char *code_str; |
---|
88 | 90 | check_info_t *ci = check->closure; |
---|
89 | 91 | struct timeval duration; |
---|
… | … | |
92 | 94 | char code[4]; |
---|
93 | 95 | char rt[14]; |
---|
| 96 | |
---|
| 97 | if(noit_hash_retrieve(check->config, "code", strlen("code"), |
---|
| 98 | (void **)&code_str)) |
---|
| 99 | expect_code = atoi(code_str); |
---|
94 | 100 | |
---|
95 | 101 | sub_timeval(ci->finish_time, check->last_fire_time, &duration); |
---|
… | … | |
401 | 407 | apr_status_t status; |
---|
402 | 408 | eventer_t newe; |
---|
| 409 | char *config_url; |
---|
403 | 410 | |
---|
404 | 411 | ci = (check_info_t *)check->closure; |
---|
… | … | |
430 | 437 | ccl->check = check; |
---|
431 | 438 | |
---|
432 | | apr_uri_parse(ci->pool, "http://localhost/", &ci->url); |
---|
| 439 | if(!noit_hash_retrieve(check->config, "url", strlen("url"), |
---|
| 440 | (void **)&config_url)) |
---|
| 441 | config_url = "http://localhost/"; |
---|
| 442 | apr_uri_parse(ci->pool, config_url, &ci->url); |
---|
| 443 | |
---|
433 | 444 | if (!ci->url.port) { |
---|
434 | 445 | ci->url.port = apr_uri_port_of_scheme(ci->url.scheme); |
---|
re3c8f10 |
r27bd35b |
|
101 | 101 | timeout = period/2; |
---|
102 | 102 | } |
---|
103 | | options = noit_conf_get_hash(sec[i], "config"); |
---|
| 103 | options = noit_conf_get_hash(sec[i], "config/*"); |
---|
104 | 104 | noit_poller_schedule(target, module, name, options, |
---|
105 | 105 | period, timeout, uuid, out_uuid); |
---|