diff --git a/plugins/inputs/net_response/README.md b/plugins/inputs/net_response/README.md index 25a959261729b..01c681b550a7b 100644 --- a/plugins/inputs/net_response/README.md +++ b/plugins/inputs/net_response/README.md @@ -60,7 +60,7 @@ It can also check response text. - net_response - response_time (float, seconds) - result_type (string) # success, timeout, connection_failed, read_failed, string_mismatch - - [**DEPRECATED**] string_mismatch (boolean) + - [**DEPRECATED**] string_found (boolean) ### Tags: diff --git a/plugins/inputs/net_response/net_response.go b/plugins/inputs/net_response/net_response.go index ab7f6bb7155c2..83a2c8aa4afd1 100644 --- a/plugins/inputs/net_response/net_response.go +++ b/plugins/inputs/net_response/net_response.go @@ -92,7 +92,7 @@ func (n *NetResponse) TcpGather() (map[string]interface{}, error) { responseTime = time.Since(start).Seconds() // Handle error if err != nil { - fields["result_type"] = "read_failed" + fields["result_type"] = "string_mismatch" } else { // Looking for string in answer RegEx := regexp.MustCompile(`.*` + n.Expect + `.*`) @@ -153,10 +153,10 @@ func (n *NetResponse) UdpGather() (map[string]interface{}, error) { find := RegEx.FindString(string(buf)) if find != "" { fields["result_type"] = "success" - fields["string_found"] = true // WARNING: This field will be deprecated in a future release. + fields["string_found"] = true } else { fields["result_type"] = "string_mismatch" - fields["string_found"] = false // WARNING: This field will be deprecated in a future release. + fields["string_found"] = false } } fields["response_time"] = responseTime