Add listen config.
This commit is contained in:
parent
58b7c43ced
commit
18d49da9da
|
@ -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
|
||||||
|
|
|
@ -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.
|
||||||
|
|
Loading…
Reference in New Issue