From 3b660e5d618c9b68354e9bdd86c3b2b76d79154e Mon Sep 17 00:00:00 2001 From: Sebastian Harl Date: Sat, 18 Apr 2015 21:44:22 +0200 Subject: [PATCH] collectd.conf(5): Add documentation for cURL statistics. --- src/collectd.conf.pod | 105 +++++++++++++++++++++++++++++++++++++++++ src/utils_curl_stats.h | 6 +-- 2 files changed, 108 insertions(+), 3 deletions(-) diff --git a/src/collectd.conf.pod b/src/collectd.conf.pod index 058cd935..925262c1 100644 --- a/src/collectd.conf.pod +++ b/src/collectd.conf.pod @@ -1451,6 +1451,92 @@ number. =back +=head2 cURL Statistics + +All cURL-based plugins support collection of generic, request-based +statistics. These are disabled by default and can be enabled selectively for +each page or URL queried from the curl, curl_json, or curl_xml plugins. See +the documentation of those plugins for specific information. This section +describes the available metrics that can be configured with each plugin. All +options are disabled by default. + +See L for more details. + +=over 4 + +=item B B + +Total time of the transfer, including name resolving, TCP connect, etc. + +=item B B + +Time it took from the start until name resolving was completed. + +=item B B + +Time it took from the start until the connect to the remote host (or proxy) +was completed. + +=item B B + +Time it took from the start until the SSL/SSH connect/handshake to the remote +host was completed. + +=item B B + +Time it took from the start until the file transfer is just about to begin. + +=item B B + +Time it took from the start until the first byte was received. + +=item B B + +Time it took for all redirection steps include name lookup, connect, +pre-transfer and transfer before final transaction was started. + +=item B B + +The total number of redirections that were actually followed. + +=item B B + +The total amount of bytes that were uploaded. + +=item B B + +The total amount of bytes that were downloaded. + +=item B B + +The average download speed that curl measured for the complete download. + +=item B B + +The average upload speed that curl measured for the complete upload. + +=item B B + +The total size of all the headers received. + +=item B B + +The total size of the issued requests. + +=item B B + +The content-length of the download. + +=item B B + +The specified size of the upload. + +=item B B + +The number of new connections that were created to achieve the transfer. + +=back + =head2 Plugin C The curl plugin uses the B (L) to read web pages @@ -1556,6 +1642,13 @@ requests. Measure response code for the request. If this setting is enabled, B blocks (see below) are optional. Disabled by default. +=item BStatisticsE> + +One B block can be used to specify cURL statistics to be collected +for each request to the remote web site. See the section "cURL Statistics" +above for details. If this setting is enabled, B blocks (see below) are +optional. + =item BMatchE> One or more B blocks that define how to match information in the data @@ -1668,6 +1761,12 @@ URL. By default the global B setting will be used. These options behave exactly equivalent to the appropriate options of the I plugin. Please see there for a detailed description. +=item BStatisticsE> + +One B block can be used to specify cURL statistics to be collected +for each request to the remote URL. See the section "cURL Statistics" above +for details. + =back The following options are valid within B blocks: @@ -1770,6 +1869,12 @@ Examples: These options behave exactly equivalent to the appropriate options of the I. Please see there for a detailed description. +=item BStatisticsE> + +One B block can be used to specify cURL statistics to be collected +for each request to the remote URL. See the section "cURL Statistics" above +for details. + =item EB IE Within each B block, there must be one or more B blocks. Each diff --git a/src/utils_curl_stats.h b/src/utils_curl_stats.h index 3a0a26eb..ef925605 100644 --- a/src/utils_curl_stats.h +++ b/src/utils_curl_stats.h @@ -36,9 +36,9 @@ struct curl_stats_s; typedef struct curl_stats_s curl_stats_t; /* - * curl_stats_from_config allocates and constructs a CURL statistics object + * curl_stats_from_config allocates and constructs a cURL statistics object * from the specified configuration which is expected to be a single block of - * boolean options named after CURL information fields. The boolean value + * boolean options named after cURL information fields. The boolean value * indicates whether to collect the respective information. * * See http://curl.haxx.se/libcurl/c/curl_easy_getinfo.html @@ -50,7 +50,7 @@ void curl_stats_destroy (curl_stats_t *s); /* * curl_stats_dispatch dispatches performance values from the the specified - * CURL session to the daemon. + * cURL session to the daemon. */ int curl_stats_dispatch (curl_stats_t *s, CURL *curl, const char *hostname, const char *plugin, const char *plugin_instance, -- 2.30.2