summaryrefslogtreecommitdiffstats
path: root/plugins/check_curl.d/config.h
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/check_curl.d/config.h')
-rw-r--r--plugins/check_curl.d/config.h76
1 files changed, 2 insertions, 74 deletions
diff --git a/plugins/check_curl.d/config.h b/plugins/check_curl.d/config.h
index be25d1bb..a4b1eecf 100644
--- a/plugins/check_curl.d/config.h
+++ b/plugins/check_curl.d/config.h
@@ -49,20 +49,7 @@ typedef struct {
49 bool no_body; 49 bool no_body;
50} check_curl_working_state; 50} check_curl_working_state;
51 51
52check_curl_working_state check_curl_working_state_init() { 52check_curl_working_state check_curl_working_state_init();
53 check_curl_working_state result = {
54 .server_address = NULL,
55 .server_url = DEFAULT_SERVER_URL,
56 .host_name = NULL,
57 .http_method = NULL,
58 .http_post_data = NULL,
59 .virtualPort = 0,
60 .serverPort = HTTP_PORT,
61 .use_ssl = false,
62 .no_body = false,
63 };
64 return result;
65}
66 53
67typedef struct { 54typedef struct {
68 bool automatic_decompression; 55 bool automatic_decompression;
@@ -123,63 +110,4 @@ typedef struct {
123 bool display_html; 110 bool display_html;
124} check_curl_config; 111} check_curl_config;
125 112
126check_curl_config check_curl_config_init() { 113check_curl_config check_curl_config_init();
127 check_curl_config tmp = {
128 .initial_config = check_curl_working_state_init(),
129
130 .curl_config =
131 {
132 .automatic_decompression = false,
133 .socket_timeout = DEFAULT_SOCKET_TIMEOUT,
134 .haproxy_protocol = false,
135 .sin_family = AF_UNSPEC,
136 .curl_http_version = CURL_HTTP_VERSION_NONE,
137 .http_opt_headers = NULL,
138 .http_opt_headers_count = 0,
139 .ssl_version = CURL_SSLVERSION_DEFAULT,
140 .client_cert = NULL,
141 .client_privkey = NULL,
142 .ca_cert = NULL,
143 .verify_peer_and_host = false,
144 .user_agent = {'\0'},
145 .proxy_auth = "",
146 .user_auth = "",
147 .http_content_type = NULL,
148 .cookie_jar_file = NULL,
149 },
150 .max_depth = DEFAULT_MAX_REDIRS,
151 .followmethod = FOLLOW_HTTP_CURL,
152 .followsticky = STICKY_NONE,
153
154 .maximum_age = -1,
155 .regexp = {},
156 .compiled_regex = {},
157 .state_regex = STATE_CRITICAL,
158 .invert_regex = false,
159 .check_cert = false,
160 .continue_after_check_cert = false,
161 .days_till_exp_warn = 0,
162 .days_till_exp_crit = 0,
163 .thlds = NULL,
164 .min_page_len = 0,
165 .max_page_len = 0,
166 .server_expect =
167 {
168 .string = HTTP_EXPECT,
169 .is_present = false,
170 },
171 .string_expect = "",
172 .header_expect = "",
173 .on_redirect_result_state = STATE_OK,
174 .on_redirect_dependent = true,
175
176 .show_extended_perfdata = false,
177 .show_body = false,
178 .display_html = false,
179 };
180
181 snprintf(tmp.curl_config.user_agent, DEFAULT_BUFFER_SIZE, "%s/v%s (monitoring-plugins %s, %s)",
182 "check_curl", NP_VERSION, VERSION, curl_version());
183
184 return tmp;
185}