mirror of
https://github.com/elastic/logstash.git
synced 2025-04-24 06:37:19 -04:00
- permit specifying the http port to run elasticsearch on if running
embedded server https://logstash.jira.com/browse/LOGSTASH-117
This commit is contained in:
parent
b01595ad47
commit
96a6307000
1 changed files with 7 additions and 0 deletions
|
@ -47,6 +47,11 @@ class LogStash::Outputs::Elasticsearch < LogStash::Outputs::Base
|
|||
# a separate elasticsearch process.
|
||||
config :embedded, :validate => :boolean, :default => false
|
||||
|
||||
# If you are running the embedded elasticsearch server, you can set the http
|
||||
# port it listens on here; it is not common to need this setting changed from
|
||||
# default.
|
||||
config :embedded_http_port, :validate => :string, :default => "9200-9300"
|
||||
|
||||
# TODO(sissel): Config for river?
|
||||
|
||||
public
|
||||
|
@ -101,6 +106,8 @@ class LogStash::Outputs::Elasticsearch < LogStash::Outputs::Base
|
|||
@logger.info("Starting embedded ElasticSearch local node.")
|
||||
builder = org.elasticsearch.node.NodeBuilder.nodeBuilder
|
||||
builder.local(true)
|
||||
builder.settings.put("http.port", @embedded_http_port)
|
||||
|
||||
@embedded_elasticsearch = builder.node
|
||||
@embedded_elasticsearch.start
|
||||
end # def start_local_elasticsearch
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue