From 1b71e60d140b48ed21ae0db9bd20801f14e0be55 Mon Sep 17 00:00:00 2001 From: Cyril Duez Date: Fri, 27 May 2016 13:31:23 +0200 Subject: [PATCH] Add webhook service address in the config file. --- etc/telegraf.conf | 3 +++ etc/telegraf_windows.conf | 3 +++ internal/config/config.go | 6 +++++- 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/etc/telegraf.conf b/etc/telegraf.conf index 05f47e861..ad6e2a533 100644 --- a/etc/telegraf.conf +++ b/etc/telegraf.conf @@ -61,6 +61,9 @@ ## If set to true, do no set the "host" tag in the telegraf agent. omit_hostname = false + ## Address to listen for webhook + webhook_service_address = ":1925" + ############################################################################### # OUTPUT PLUGINS # diff --git a/etc/telegraf_windows.conf b/etc/telegraf_windows.conf index 9ce067c39..23150cdba 100644 --- a/etc/telegraf_windows.conf +++ b/etc/telegraf_windows.conf @@ -49,6 +49,9 @@ ## Override default hostname, if empty use os.Hostname() hostname = "" + ## Address to listen for webhook + webhook_service_address = ":1925" + ############################################################################### # OUTPUTS # diff --git a/internal/config/config.go b/internal/config/config.go index 397b8bd16..536c3d58d 100644 --- a/internal/config/config.go +++ b/internal/config/config.go @@ -59,6 +59,7 @@ func NewConfig() *Config { RoundInterval: true, FlushInterval: internal.Duration{Duration: 10 * time.Second}, FlushJitter: internal.Duration{Duration: 5 * time.Second}, + WebhookServiceAddress: ":1925", }, Tags: make(map[string]string), @@ -123,7 +124,7 @@ type AgentConfig struct { Hostname string OmitHostname bool - // + // Address for listening webhooks WebhookServiceAddress string } @@ -222,6 +223,9 @@ var header = `# Telegraf Configuration ## If set to true, do no set the "host" tag in the telegraf agent. omit_hostname = false + ## Address to listen for webhook + webhook_service_address = ":1925" + ############################################################################### # OUTPUT PLUGINS #