diff --git a/agent/agent.go b/agent/agent.go index 4ce7a3aab..2806c0013 100644 --- a/agent/agent.go +++ b/agent/agent.go @@ -328,7 +328,7 @@ func (a *Agent) Run(shutdown chan struct{}) error { // channel shared between all input threads for accumulating metrics metricC := make(chan telegraf.Metric, 10000) webserver := webserver.NewWebserver() - webserver.ServiceAddress = ":1619" + webserver.ServiceAddress = a.Config.Agent.WebhookServiceAddress for _, input := range a.Config.Inputs { // Start service of any ServicePlugins diff --git a/internal/config/config.go b/internal/config/config.go index daaaa10fc..0d0ebca72 100644 --- a/internal/config/config.go +++ b/internal/config/config.go @@ -122,6 +122,9 @@ type AgentConfig struct { Quiet bool Hostname string OmitHostname bool + + // + WebhookServiceAddress string } // Inputs returns a list of strings of the configured inputs.