Add listen config.

This commit is contained in:
François de Metz 2016-05-25 21:08:58 +02:00 committed by Cyril Duez
parent 58b7c43ced
commit 18d49da9da
2 changed files with 4 additions and 1 deletions

View File

@ -328,7 +328,7 @@ func (a *Agent) Run(shutdown chan struct{}) error {
// channel shared between all input threads for accumulating metrics // channel shared between all input threads for accumulating metrics
metricC := make(chan telegraf.Metric, 10000) metricC := make(chan telegraf.Metric, 10000)
webserver := webserver.NewWebserver() webserver := webserver.NewWebserver()
webserver.ServiceAddress = ":1619" webserver.ServiceAddress = a.Config.Agent.WebhookServiceAddress
for _, input := range a.Config.Inputs { for _, input := range a.Config.Inputs {
// Start service of any ServicePlugins // Start service of any ServicePlugins

View File

@ -122,6 +122,9 @@ type AgentConfig struct {
Quiet bool Quiet bool
Hostname string Hostname string
OmitHostname bool OmitHostname bool
//
WebhookServiceAddress string
} }
// Inputs returns a list of strings of the configured inputs. // Inputs returns a list of strings of the configured inputs.