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

@@ -137,16 +137,15 @@ func (a *Agent) gatherer(
}
gatherWithTimeout(shutdown, input, acc, interval)
elapsed := time.Since(start)
if a.Config.Agent.Debug {
log.Printf("Input [%s] gathered metrics, (%s interval) in %s\n",
input.Name, interval, elapsed)
}
if outerr != nil {
return outerr
}
if a.Config.Agent.Debug {
log.Printf("Input [%s] gathered metrics, (%s interval) in %s\n",
input.Name, interval, elapsed)
}
select {
case <-shutdown: