From 5a63bde01fd67f0837f0bb857980f251b7b9f7f5 Mon Sep 17 00:00:00 2001 From: Pawel Zak Date: Tue, 10 Sep 2024 10:47:45 +0200 Subject: [PATCH] newLogstash --- plugins/inputs/logstash/logstash.go | 13 ++++++------- plugins/inputs/logstash/logstash_test.go | 2 +- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/plugins/inputs/logstash/logstash.go b/plugins/inputs/logstash/logstash.go index 5eb3d39ef8c4f..51e792021be44 100644 --- a/plugins/inputs/logstash/logstash.go +++ b/plugins/inputs/logstash/logstash.go @@ -510,17 +510,16 @@ func (logstash *Logstash) Stop() { // init registers this plugin instance func init() { inputs.Add("logstash", func() telegraf.Input { - return NewLogstash() + return newLogstash() }) } -// NewLogstash create an instance of the plugin with default settings -func NewLogstash() *Logstash { +// newLogstash create an instance of the plugin with default settings +func newLogstash() *Logstash { return &Logstash{ - URL: "http://127.0.0.1:9600", - SinglePipeline: false, - Collect: []string{"pipelines", "process", "jvm"}, - Headers: make(map[string]string), + URL: "http://127.0.0.1:9600", + Collect: []string{"pipelines", "process", "jvm"}, + Headers: make(map[string]string), HTTPClientConfig: httpconfig.HTTPClientConfig{ Timeout: config.Duration(5 * time.Second), }, diff --git a/plugins/inputs/logstash/logstash_test.go b/plugins/inputs/logstash/logstash_test.go index 5c7811902133f..1965f332aff03 100644 --- a/plugins/inputs/logstash/logstash_test.go +++ b/plugins/inputs/logstash/logstash_test.go @@ -13,7 +13,7 @@ import ( "github.com/influxdata/telegraf/testutil" ) -var logstashTest = NewLogstash() +var logstashTest = newLogstash() var ( logstash5accPipelineStats testutil.Accumulator