diff options
author | Lorenz Kästle <12514511+RincewindsHat@users.noreply.github.com> | 2025-09-12 16:37:24 +0200 |
---|---|---|
committer | Lorenz Kästle <12514511+RincewindsHat@users.noreply.github.com> | 2025-09-12 16:37:24 +0200 |
commit | 44b2a25a6b9fb0791ec7150100a4d51e5f129611 (patch) | |
tree | 4fb13f9effac32bf156cc6eaefe22f6deea6d7ea /plugins/check_curl.d/check_curl_helpers.h | |
parent | aaff3aa9da27ff7666d2a776d524c784b76eb3d7 (diff) | |
download | monitoring-plugins-44b2a25a6b9fb0791ec7150100a4d51e5f129611.tar.gz |
check_curl: implement new output mechanism
Diffstat (limited to 'plugins/check_curl.d/check_curl_helpers.h')
-rw-r--r-- | plugins/check_curl.d/check_curl_helpers.h | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/plugins/check_curl.d/check_curl_helpers.h b/plugins/check_curl.d/check_curl_helpers.h index 0f43ab90..87e45a9d 100644 --- a/plugins/check_curl.d/check_curl_helpers.h +++ b/plugins/check_curl.d/check_curl_helpers.h | |||
@@ -1,7 +1,11 @@ | |||
1 | #include "./config.h" | 1 | #include "./config.h" |
2 | #include <curl/curl.h> | 2 | #include <curl/curl.h> |
3 | #include "../picohttpparser/picohttpparser.h" | 3 | #include "../picohttpparser/picohttpparser.h" |
4 | // #include "curl/easy.h" | 4 | #include "output.h" |
5 | |||
6 | #if defined(HAVE_SSL) && defined(USE_OPENSSL) | ||
7 | # include <openssl/opensslv.h> | ||
8 | #endif | ||
5 | 9 | ||
6 | /* for buffers for header and body */ | 10 | /* for buffers for header and body */ |
7 | typedef struct { | 11 | typedef struct { |
@@ -99,8 +103,8 @@ int curlhelp_parse_statusline(const char * /*buf*/, curlhelp_statusline * /*stat | |||
99 | void curlhelp_free_statusline(curlhelp_statusline * /*status_line*/); | 103 | void curlhelp_free_statusline(curlhelp_statusline * /*status_line*/); |
100 | 104 | ||
101 | char *get_header_value(const struct phr_header *headers, size_t nof_headers, const char *header); | 105 | char *get_header_value(const struct phr_header *headers, size_t nof_headers, const char *header); |
102 | mp_state_enum check_document_dates(const curlhelp_write_curlbuf * /*header_buf*/, | 106 | mp_subcheck check_document_dates(const curlhelp_write_curlbuf * /*header_buf*/, |
103 | const char msg[static DEFAULT_BUFFER_SIZE], int /*maximum_age*/); | 107 | int /*maximum_age*/); |
104 | size_t get_content_length(const curlhelp_write_curlbuf *header_buf, | 108 | size_t get_content_length(const curlhelp_write_curlbuf *header_buf, |
105 | const curlhelp_write_curlbuf *body_buf); | 109 | const curlhelp_write_curlbuf *body_buf); |
106 | int lookup_host(const char *host, char *buf, size_t buflen, sa_family_t addr_family); | 110 | int lookup_host(const char *host, char *buf, size_t buflen, sa_family_t addr_family); |
@@ -114,12 +118,7 @@ void cleanup(check_curl_global_state global_state); | |||
114 | bool expected_statuscode(const char *reply, const char *statuscodes); | 118 | bool expected_statuscode(const char *reply, const char *statuscodes); |
115 | char *string_statuscode(int major, int minor); | 119 | char *string_statuscode(int major, int minor); |
116 | 120 | ||
117 | char *perfd_time(double elapsed_time, thresholds * /*thlds*/, long /*socket_timeout*/); | ||
118 | char *perfd_time_connect(double elapsed_time_connect, long /*socket_timeout*/); | ||
119 | char *perfd_time_ssl(double elapsed_time_ssl, long /*socket_timeout*/); | ||
120 | char *perfd_time_firstbyte(double elapsed_time_firstbyte, long /*socket_timeout*/); | ||
121 | char *perfd_time_headers(double elapsed_time_headers, long /*socket_timeout*/); | ||
122 | char *perfd_time_transfer(double elapsed_time_transfer, long /*socket_timeout*/); | ||
123 | char *perfd_size(size_t page_len, int /*min_page_len*/); | ||
124 | |||
125 | void test_file(char *path); | 121 | void test_file(char *path); |
122 | mp_subcheck check_curl_certificate_checks(CURL *curl, X509 *cert, int warn_days_till_exp, | ||
123 | int crit_days_till_exp); | ||
124 | char *fmt_url(check_curl_working_state workingState); | ||