Comments (11)
thanks for documenting your workaround for this. running embedded elasticseach is typically only meant for local quick & easy prototyping and testing, it wasn't mean for connecting to a cluster or even installing plugins. I suggest you install an external elasticsearch instance and use it to install your plugins and connect to your cluster. Let me know if this makes sense.
from logstash.
Will go ahead and close this.
from logstash.
So Logstash
uses ES to connect to a cluster anyhow. I'm talking about:
output {
elasticsearch { cluster => "logstash" }
stdout { codec => rubydebug }
}
That relies on the ES that's bundled with Logstash, as far as I can tell.
I'm not sure how else Logstash is supposed to connect to an ES cluster on AWS or GCE.
Although, I know that @imperialwicket from IRC got it up and running another way, though.
from logstash.
Ok, there are 2 things here:
- starting/using an embedded ES server. A local ES server will be started locally and data can be indexed in this local ES.
- logstash using the ES libraries (known as the node or transport protocols) to communicate with a remote ES server.
when using:
output {
elasticsearch {
host => "some_host"
cluster => "logstash"
}
}
logstash will send data to a ES server running on some_host using the node protocol (which is the default, using port 9300). You can also use the http protocol to talk to a remote ES server using the protocol => "http"
option.
Does this make sense?
from logstash.
Alright, that does make more sense. The embedded ES server uses the same ES libraries that are used for the node or transport protocols when logstash communicates to an ES cluster, correct? Thanks, clears up a bit.
I think what I was trying to say is that with an ES cluster on AWS EC2, logstash cannot discover the cluster using the ES libraries, as by default, the ES cluster on AWS EC2 discovers each other not with multicast/unicast/IP addresses, but using the cloud-aws plugin.
I hope that clears things up a bit.
from logstash.
That's right, logstash includes the ES jars which are used either to spin an embedded ES server or for providing the node/transport protocol.
For speaking to your AWS cluster, you should be able to connect with both node/transport or http, given you expose the correct tcp ports (by default 9200 for http and 9300 for node/transport). Unless you have particular reason for using node/transport, I'd suggest you use http when connecting to a remote cluster.
Let me know if that help.
from logstash.
For anyone trying to run the cloud-aws plugin I solved it via: elastic/elasticsearch-cloud-aws#71 (comment)
from logstash.
Just ran into this issue as well. Would really love the ability to easily install the cloud-aws plugin to have it connect to my existing ES cluster. Was unable to find any documentation on how to go about doing so, and this github issue was the only reference I've found
from logstash.
+1 for @jlintz comment. I am implementing this today on AWS and also need the ability to install the cloud-aws plugin via Logstash. Have some hope that @joekiller solution will be the answer.
from logstash.
@vdbrooks I ended up just setting up a non-data ES instance with the cloud-aws plugin configured and then pointed logstash at localhost to workaround this. It was a bit more straight forward to handle with the puppet modules
from logstash.
The easiest way for me to make this work is to install ElasticSearch 1.1.1 from the binaries, install the cloud-aws plugin via their bin/plugin script and then add to my /etc/sysconfig/logstash entry the following:
LS_JAVA_OPTS="$LS_JAVA_OPTS -Des.path.home=/usr/local/elasticsearch -Des.config=/opt/logstash/elasticsearch.yml"
The LS_JAVA_OPTS is picked up by bin/logstash
and appended to the startup. You can modify anything that ElasticSearch is looking for by checking out the following reference: http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/setup-dir-layout.html
I just set my es.path.home to the root of the elasticsearch install because that allows it to resolve the {es.home}/plugins path as well which is easier than copying stuff all over the place.
YOU MUST MATCH ES BINARY VERSIONS FOR THIS TO WORK. IE ES 1.1.1 is what Logstash 1.4.2 uses. This all works because logstash's internal ElasticSearch jar file is referenced first so the only jars that are loaded afterwards are those which are not present at startup.
Side note you can see from elasticsearch's bin/plugin file that it is really just a java call that they are executing (https://github.com/elasticsearch/elasticsearch/blob/master/bin/plugin). Someone could feasibly use the jar files in logstash's vendor/jar/elasticsearch/lib directory to make the proper org.elasticsearch.plugins.PluginManager call but I'm not bothering because I'm installing a mirror ES 1.1.1 binary on the machine along with logstash to get the plugin. Different strokes people but in the end, use the java opts to make logstash do your dance.
from logstash.
Related Issues (20)
- Docs: Logstash 7.17.17 release docs
- AppInfo mbean errors since update to 8.11.4, logstash now terminates after upgrading to 8.12.0 HOT 1
- Logstash gets stuck in infinite retry loop writing to Time Series Data Streams HOT 5
- Logstash::Json#dump writes invalid JSON when source contains non-UTF8 strings
- tcp output plugin loadbalance feature request HOT 1
- [Doc] add instructions on enabling JUL logs in Logstash
- Doc: Expand integrations docs to allow for more use cases
- Update JDK for 7.17 HOT 1
- Update JDK on main HOT 1
- Re-enable collectd codec in the list of testing support plugins
- Doc: Stop publishing Logstash on Kubernetes docs in favor of Logstash on ECK docs
- Add an option to populate event.created on all inputs. HOT 1
- Remove usage of deprecated buildDir property from Gradle scripts
- Doc: Add ingest pipeline tutorial for extending integrations
- Extend cursor/checkpoint option to additional input plugins.
- output http export data to DORIS response 307 HOT 2
- Make JDK bundling reproducible.
- Doc: Troubleshoot missing graphics in monitoring topics HOT 2
- Docs: Logstash 8.12.1 release docs
- Avoid to run rspec tests directly from Gradle script HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from logstash.