diff --git a/plugins/inputs/http_response/README.md b/plugins/inputs/http_response/README.md index 3bee4fdfe..127a4530b 100644 --- a/plugins/inputs/http_response/README.md +++ b/plugins/inputs/http_response/README.md @@ -1,6 +1,6 @@ -# Example Input Plugin +# HTTP Response Input Plugin -This input plugin will test HTTP/HTTPS connections. +This input plugin checks HTTP/HTTPS connections. ### Configuration: @@ -41,27 +41,25 @@ This input plugin will test HTTP/HTTPS connections. # Host = "github.com" ``` -### Measurements & Fields: +### Metrics: - http_response - - response_time (float, seconds) # Not set if target is unreachable for any reason - - http_response_code (int) # The HTTP code received - - result_type (string) # Legacy field mantained for backwards compatibility - - result_code (int) # Details [here](#result-tag-and-result_code-field) + - tags: + - server (target URL) + - method (request method) + - status_code (response status code) + - result ([see below](#result--result_code)) + - fields: + - response_time (float, seconds) + - http_response_code (int, response status code) + - result_type (string, deprecated in 1.6: use `result` tag and `result_code` field) + - result_code (int, [see below](#result--result_code)) +#### `result` / `result_code` -### Tags: - -- All measurements have the following tags: - - server # Server URL used - - method # HTTP method used (GET, POST, PUT, etc) - - status_code # String with the HTTP status code - - result # Details [here](#result-tag-and-result_code-field) - -### Result tag and Result_code field Upon finishing polling the target server, the plugin registers the result of the operation in the `result` tag, and adds a numeric field called `result_code` corresponding with that tag value. -This tag is used to expose network and plugin errors. HTTP errors are considered a sucessful connection by the plugin. +This tag is used to expose network and plugin errors. HTTP errors are considered a successful connection. |Tag value |Corresponding field value|Description| --------------------------|-------------------------|-----------| @@ -72,10 +70,9 @@ This tag is used to expose network and plugin errors. HTTP errors are considered |timeout | 4 |The plugin timed out while awaiting the HTTP connection to complete| |dns_error | 5 |There was a DNS error while attempting to connect to the host| -NOTE: The error codes are derived from the error object returned by the `net/http` Go library, so the accuracy of the errors depends on the handling of error states by the `net/http` Go library. **If a more detailed error report is required use the `log_network_errors` setting.** ### Example Output: ``` -http_response,method=GET,server=http://www.github.com,status_code="200",result="success" http_response_code=200i,response_time=6.223266528,result_type="sucess",result_code=0i 1459419354977857955 +http_response,method=GET,server=http://www.github.com,status_code=200,result=success http_response_code=200i,response_time=6.223266528,result_type="success",result_code=0i 1459419354977857955 ```