Comments (7)
@ph Anyone help me to resolve this issue to come of it.
from logstash-filter-elasticsearch.
@ganesh2303 Hi, don't you miss some fields in your elasticsearch filter ?
Such as :
hosts => "localhost:9200"
index => "yourIndex"
Did you try to execute your query using command line directly on your Index?
from logstash-filter-elasticsearch.
@Nanjou-IT
I tried as you mentioned above scenario even though its reproducing same result which i got early, but i fetching data in kibana console. Please find the below image,
from logstash-filter-elasticsearch.
@ganesh2303 Ok and if you try the following configuration ?
elasticsearch {
hosts => "localhost:9200"
index => "yourIndex"
query => "type:gvsh_reqold AND dlr_dlrCode:%{dlr_dlrCode} AND getVehicle_VIN:%{vehicle_vehicleID}"
fields => { "vehicle_SSC" => "vehicle_SSC" }
}
from logstash-filter-elasticsearch.
@Nanjou-IT
elasticsearch {
hosts => ["localhost:9200"]
index => "logstash-dd.getvehicleservicehistory"
query => "type:gvsh_reqold AND dlr_dlrCode:%{dlr_dlrCode} AND getVehicle_VIN:%{getVehicle_VIN}"
fields => [
"vehicle_SSC","vehicle_SSC"
]
}
this is code im using when i try this im getting following error,
[2017-03-01T03:25:41,865][INFO ][logstash.filters.elasticsearch] Querying elasticsearch for lookup {:params=>{:index=>"logstash-dd.getvehicleservicehistory", :q=>"type:gvsh_reqold AND dlr_dlrCode:04136 AND getVehicle_VIN:xxxxx", :size=>1, :sort=>"@timestamp:desc"}}
[2017-03-01T03:25:41,908][WARN ][logstash.filters.elasticsearch] Failed to query elasticsearch for previous event {:index=>"logstash-dd.getvehicleservicehistory", :query=>"type:gvsh_reqold AND dlr_dlrCode:04136 AND getVehicle_VIN:xxxxxx", :event=>2017-03-01T11:25:31.425Z
from logstash-filter-elasticsearch.
@Nanjou-IT
instead of using above config if i used this im not getting any error and field is not creating
elasticsearch {
query_template => "/template.json"
}
template.json
{
"query": {
"query_string": {
"query": "type:gvsh_reqold AND dlr_dlrCode:%{dlr_dlrCode} AND getVehicle_VIN:%{vehicle_vehicleID}"
}
},
"fields": ["vehicle_SSC","vehicle_SSC"]
}
from logstash-filter-elasticsearch.
Sorry for the delay here.
@ganesh2303 is this still an issue for you?
From what I can see in your examples, you were specifying fields
as an array, where it should have been a hash:
# your config
fields => [ "vehicle_SSC","vehicle_SSC" ]
# should have been
fields => { "vehicle_SSC" => "vehicle_SSC" }
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.