Comments (6)
The problem appears to be with this line. It replaces URL strings with ruby hashes.
In my example, before:
{:hosts=>["https://example.us-central1.gcp.cloud.es.io:9243/"]}
and after this line
{:hosts=>[{:host=>"https://example.us-central1.gcp.cloud.es.io:9243/", :scheme=>"https"}]}
from logstash-filter-elasticsearch.
Currently setting ssl => true
is completely broken in this plugin. I'm adding tests to describe the desired behaviour. However the full rewrite of the HTTP subsystem we want to do, to bring all 3 ES plugins in line is out of scope for this bug fix.
Here's how I intend to make it behave, after this bug fix.
it "should accept schema-less hosts"
it "should accept hosts with a schema"
it "should add https to schema-less hosts when specifying ssl true"
it "should log an error and raise, when specifying a schema in at least one host, and setting ssl true"
it "should log an error and raise, when specifying a schema in at least one host, and setting ssl false"
Note that the last two are a bit more strict than the behaviour of output-elasticsearch. Specifying any schema in the host list, then setting ssl
(which is meant to add a schema everywhere for them) is simply a user passing conflicting args.
I don't think we should jump through hoops to try to accomodate this behaviour. The user should either specify schema for all hosts, or not specify them for any. Then if you set ssl => true
we add https://
for you (adding ssl => false
doesn't need to do anything, ES::Client will default to http).
If someone needs to specify a mixed set of SSL and not SSL, it's just as simple: specify your http and https schemas in the host list and don't touch the ssl
attribute.
Of course the error will make it clear that they should use one or the other, not both. Same for the documentation for ssl
.
from logstash-filter-elasticsearch.
I can confirm I've been getting this as well.
from logstash-filter-elasticsearch.
This bug cost me some hours :(
One suggestion and one please I have:
Suggestion
Could you please remove ssl
option from official documentation or better document the problem with it there.
Question
However the full rewrite of the HTTP subsystem we want to do, to bring all 3 ES plugins in line is out of scope for this bug fix.
Can I see new plugin versions already somewhere as an alpha or beta?
Best regards, Nils
from logstash-filter-elasticsearch.
Issue #129 is related to this as well.
from logstash-filter-elasticsearch.
Thank you very much for taking the time to open this issue.
I'm closing it as It seems to be already fixed by this PR #156. Please feel free to reopen if the problem still exists. Thanks!
from logstash-filter-elasticsearch.
Related Issues (20)
- Ability to use search templates
- Default setting for "hosts" not working HOT 1
- Fix 8.0 testing due to dropping of document types
- Illegal character in authority at index 8 HOT 10
- [Doc]Remove old compatibility note
- Specifying multiple indices HOT 2
- Fail to parse query_template HOT 1
- [Doc] Update links to new cloud content in Logstash Reference
- [Doc] Configuration option descriptions are inconsistent and lack helpful info
- does not work properly with updated ES client HOT 1
- Add support for configurable timeouts HOT 1
- regression on Manticore 0.8.0 due port being part of host HOT 3
- setting custom user-agent header has no effect HOT 3
- _id
- Add the ability to retry on failure.
- Add a "ssl_certificate_verification" field to Logstash's Elasticsearch Filter
- Change declaration of hosts option to add functionality
- Give a default value to query
- Need cleaning up resources for es-ruby client when pipeline restart
- Select only specific fields from elasticsearch
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-filter-elasticsearch.