Utilize timeout in net_response plugin.

Also changing the net_response and http_response plugins to only accept
duration strings for their timeout parameters. This is a breaking config
file change.

closes #1214
This commit is contained in:
Cameron Sparr
2016-05-23 13:33:43 +01:00
parent c6699c36d3
commit c44ecf54a5
10 changed files with 118 additions and 104 deletions

View File

@@ -6,41 +6,30 @@ It can also check response text.
### Configuration:
```
# List of UDP/TCP connections you want to check
[[inputs.net_response]]
protocol = "tcp"
# Server address (default IP localhost)
address = "github.com:80"
# Set timeout (default 1.0)
timeout = 1.0
# Set read timeout (default 1.0)
read_timeout = 1.0
# String sent to the server
send = "ssh"
# Expected string in answer
expect = "ssh"
[[inputs.net_response]]
protocol = "tcp"
address = ":80"
# TCP or UDP 'ping' given url and collect response time in seconds
[[inputs.net_response]]
protocol = "udp"
# Server address (default IP localhost)
## Protocol, must be "tcp" or "udp"
protocol = "tcp"
## Server address (default localhost)
address = "github.com:80"
# Set timeout (default 1.0)
timeout = 1.0
# Set read timeout (default 1.0)
read_timeout = 1.0
# String sent to the server
## Set timeout
timeout = "1s"
## Optional string sent to the server
send = "ssh"
# Expected string in answer
## Optional expected string in answer
expect = "ssh"
## Set read timeout (only used if expecting a response)
read_timeout = "1s"
[[inputs.net_response]]
protocol = "udp"
address = "localhost:161"
timeout = 2.0
timeout = "2s"
```
### Measurements & Fields: