File tree Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -259,6 +259,14 @@ def config_init(params)
259259 end
260260
261261 def build_client
262+ # the following 3 options validation & setup methods are called inside build_client
263+ # because they must be executed prior to building the client and logstash
264+ # monitoring and management rely on directly calling build_client
265+ # see https://github.com/logstash-plugins/logstash-output-elasticsearch/pull/934#pullrequestreview-396203307
266+ validate_authentication
267+ fill_hosts_from_cloud_id
268+ setup_hosts
269+
262270 params [ "metric" ] = metric
263271 if @proxy . eql? ( '' )
264272 @logger . warn "Supplied proxy setting (proxy => '') has no effect"
Original file line number Diff line number Diff line change @@ -20,9 +20,6 @@ def register
2020 @stopping = Concurrent ::AtomicBoolean . new ( false )
2121 # To support BWC, we check if DLQ exists in core (< 5.4). If it doesn't, we use nil to resort to previous behavior.
2222 @dlq_writer = dlq_enabled? ? execution_context . dlq_writer : nil
23- validate_authentication
24- fill_hosts_from_cloud_id
25- setup_hosts # properly sets @hosts
2623 build_client
2724 setup_after_successful_connection
2825 check_action_validity
You can’t perform that action at this time.
0 commit comments