mirror of
https://github.com/elastic/logstash.git
synced 2025-04-23 22:27:21 -04:00
Set a default node.name
This now causes logstash elasticsearch NodeClients to show up in the cluster node list as "logstash-<hostname>-<pid>-xxxx" This should help all users identify logstash nodes among their cluster.
This commit is contained in:
parent
13b11c8ecd
commit
521cd1aeb7
1 changed files with 6 additions and 1 deletions
|
@ -177,7 +177,12 @@ class LogStash::Outputs::ElasticSearch < LogStash::Outputs::Base
|
|||
client_settings["cluster.name"] = @cluster if @cluster
|
||||
client_settings["network.host"] = @bind_host if @bind_host
|
||||
client_settings["transport.tcp.port"] = @bind_port if @bind_port
|
||||
client_settings["node.name"] = @node_name if @node_name
|
||||
|
||||
if @node_name
|
||||
client_settings["node.name"] = @node_name
|
||||
else
|
||||
client_settings["node.name"] = "logstash-#{Socket.gethostname}-#{$$}-#{object_id}"
|
||||
end
|
||||
|
||||
if @protocol.nil?
|
||||
@protocol = (RUBY_PLATFORM == "java") ? "node" : "http"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue