Skip to content

Commit 6bd3601

Browse files
authored
remove obsolete options and flip add_hostname value (#356)
1 parent 86f4c49 commit 6bd3601

File tree

6 files changed

+30
-32
lines changed

6 files changed

+30
-32
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 6.0.0
2+
- Removed obsolete setting congestion_threshold and target_field_for_codec
3+
- Changed default value of `add_hostname` to false
4+
15
## 5.1.8
26
- Loosen jar-dependencies manager gem dependency to allow plugin to work with JRubies that include a later version.
37

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
5.1.8
1+
6.0.0

docs/index.asciidoc

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -116,11 +116,10 @@ input plugins.
116116
[id="plugins-{type}s-{plugin}-add_hostname"]
117117
===== `add_hostname`
118118

119-
added[5.1.4, Field was added to allow users to control whether or not the `host` field is automatically added to events.]
120-
deprecated[5.1.4, In future versions of this plugin, this setting will be removed, and the 'hosts' field will not be added to events.]
119+
deprecated[6.0.0, The default value has been changed to `false`. In 7.0.0 this setting will be removed]
121120

122121
* Value type is <<boolean,boolean>>
123-
* Default value is `true`
122+
* Default value is `false`
124123

125124
Flag to determine whether to add `host` field to event using the value supplied by the beat in the `hostname` field.
126125

lib/logstash/inputs/beats.rb

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,7 @@ class LogStash::Inputs::Beats < LogStash::Inputs::Base
8383
config :ssl_certificate_authorities, :validate => :array, :default => []
8484

8585
# Flag to determine whether to add host information (provided by the beat in the 'hostname' field) to the event
86-
config :add_hostname, :validate => :boolean, :default => true, :deprecated => 'Host field will not be automatically populated by future version of the Beats input'
87-
86+
config :add_hostname, :validate => :boolean, :default => false, :deprecated => 'This option will be removed in the future as beats determine the event schema'
8887

8988
# By default the server doesn't do any client verification.
9089
#
@@ -106,13 +105,6 @@ class LogStash::Inputs::Beats < LogStash::Inputs::Base
106105
# Time in milliseconds for an incomplete ssl handshake to timeout
107106
config :ssl_handshake_timeout, :validate => :number, :default => 10000
108107

109-
# The number of seconds before we raise a timeout.
110-
# This option is useful to control how much time to wait if something is blocking the pipeline.
111-
config :congestion_threshold, :validate => :number, :obsolete => "This option is obsolete since congestion control is done automatically"
112-
113-
# This is the default field to which the specified codec will be applied.
114-
config :target_field_for_codec, :validate => :string, :obsolete => "This option is obsolete"
115-
116108
# The minimum TLS version allowed for the encrypted connections. The value must be one of the following:
117109
# 1.0 for TLS 1.0, 1.1 for TLS 1.1, 1.2 for TLS 1.2
118110
config :tls_min_version, :validate => :number, :default => TLS.min.version

lib/tasks/test.rake

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ VENDOR_PATH = File.expand_path(File.join(File.dirname(__FILE__), "..", "..", "ve
44

55
#TODO: Figure out better means to keep this version in sync
66
if OS_PLATFORM == "linux"
7-
FILEBEAT_URL = "https://artifacts.elastic.co/downloads/beats/filebeat/filebeat-6.0.0-alpha2-linux-x86_64.tar.gz"
7+
FILEBEAT_URL = "https://artifacts.elastic.co/downloads/beats/filebeat/filebeat-6.5.4-linux-x86_64.tar.gz"
88
elsif OS_PLATFORM == "darwin"
9-
FILEBEAT_URL = "https://artifacts.elastic.co/downloads/beats/filebeat/filebeat-6.0.0-alpha2-darwin-x86_64.tar.gz"
9+
FILEBEAT_URL = "https://artifacts.elastic.co/downloads/beats/filebeat/filebeat-6.5.4-darwin-x86_64.tar.gz"
1010
end
1111

1212
LSF_URL = "https://download.elastic.co/logstash-forwarder/binaries/logstash-forwarder_#{OS_PLATFORM}_amd64"

spec/integration/filebeat_spec.rb

Lines changed: 20 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -37,14 +37,13 @@
3737
let(:filebeat_config) do
3838
{
3939
"filebeat" => {
40-
"prospectors" => [{ "paths" => [log_file], "input_type" => "log" }],
41-
"scan_frequency" => "1s",
42-
"idle_timeout" => "1s"
40+
"prospectors" => [{ "paths" => [log_file], "type" => "log" }],
41+
"scan_frequency" => "1s"
4342
},
4443
"output" => {
4544
"logstash" => { "hosts" => ["#{host}:#{port}"] },
46-
"logging" => { "level" => "debug" }
47-
}
45+
},
46+
"logging" => { "level" => "debug" }
4847
}
4948
end
5049

@@ -90,9 +89,10 @@
9089
"logstash" => {
9190
"hosts" => ["#{host}:#{port}"],
9291
"ssl" => { "certificate_authorities" => certificate_authorities }
93-
},
94-
"logging" => { "level" => "debug" }
95-
}})
92+
}
93+
},
94+
"logging" => { "level" => "debug" }
95+
})
9696
end
9797

9898
let(:input_config) do
@@ -123,9 +123,10 @@
123123
"versions" => ["TLSv1.2"],
124124
"cipher_suites" => [beats_cipher]
125125
}
126-
},
127-
"logging" => { "level" => "debug" }
128-
}})
126+
}
127+
},
128+
"logging" => { "level" => "debug" }
129+
})
129130
end
130131

131132
let(:input_config) {
@@ -222,9 +223,10 @@
222223
"certificate" => certificate_file,
223224
"key" => certificate_key_file
224225
}
225-
},
226-
"logging" => { "level" => "debug" }
227-
}})
226+
}
227+
},
228+
"logging" => { "level" => "debug" }
229+
})
228230
end
229231

230232
let(:input_config) do
@@ -319,9 +321,10 @@
319321
"certificate" => secondary_client_certificate_file,
320322
"key" => secondary_client_certificate_key_file
321323
}
322-
},
323-
"logging" => { "level" => "debug" }
324-
}})
324+
}
325+
},
326+
"logging" => { "level" => "debug" }
327+
})
325328
end
326329

327330
include_examples "send events"

0 commit comments

Comments
 (0)