Add result_type field to net_response input plugin (#2990)
This commit is contained in:
committed by
Daniel Nelson
parent
08bdb780c6
commit
39a8f73260
@@ -1,4 +1,4 @@
|
||||
# Example Input Plugin
|
||||
# Network Response Input Plugin
|
||||
|
||||
The input plugin test UDP/TCP connections response time.
|
||||
It can also check response text.
|
||||
@@ -59,7 +59,8 @@ It can also check response text.
|
||||
|
||||
- net_response
|
||||
- response_time (float, seconds)
|
||||
- string_found (bool) # Only if "expected: option is set
|
||||
- result_type (string) # success, timeout, connection_failed, read_failed, string_mismatch
|
||||
- [**DEPRECATED**] string_found (boolean)
|
||||
|
||||
### Tags:
|
||||
|
||||
@@ -72,7 +73,11 @@ It can also check response text.
|
||||
|
||||
```
|
||||
$ ./telegraf --config telegraf.conf --input-filter net_response --test
|
||||
net_response,server=192.168.2.2,port=22,protocol=tcp response_time=0.18070360500000002,string_found=true 1454785464182527094
|
||||
net_response,server=192.168.2.2,port=2222,protocol=tcp response_time=1.090124776,string_found=false 1454784433658942325
|
||||
|
||||
net_response,server=influxdata.com,port=8080,protocol=tcp,host=localhost result_type="timeout" 1499310361000000000
|
||||
net_response,server=influxdata.com,port=443,protocol=tcp,host=localhost result_type="success",response_time=0.088703864 1499310361000000000
|
||||
net_response,protocol=tcp,host=localhost,server=this.domain.does.not.exist,port=443 result_type="connection_failed" 1499310361000000000
|
||||
net_response,protocol=udp,host=localhost,server=influxdata.com,port=8080 result_type="read_failed" 1499310362000000000
|
||||
net_response,port=31338,protocol=udp,host=localhost,server=localhost result_type="string_mismatch",string_found=false,response_time=0.00242682 1499310362000000000
|
||||
net_response,protocol=udp,host=localhost,server=localhost,port=31338 response_time=0.001128598,result_type="success",string_found=true 1499310362000000000
|
||||
net_response,server=this.domain.does.not.exist,port=443,protocol=udp,host=localhost result_type="connection_failed" 1499310362000000000
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user