Code Monkey home page Code Monkey logo

Comments (7)

ganesh2303 avatar ganesh2303 commented on June 27, 2024

@ph Anyone help me to resolve this issue to come of it.

from logstash-filter-elasticsearch.

batkovic75 avatar batkovic75 commented on June 27, 2024

@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.

ganesh2303 avatar ganesh2303 commented on June 27, 2024

@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,
image

from logstash-filter-elasticsearch.

batkovic75 avatar batkovic75 commented on June 27, 2024

@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.

ganesh2303 avatar ganesh2303 commented on June 27, 2024

@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.

ganesh2303 avatar ganesh2303 commented on June 27, 2024

@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.

webmat avatar webmat commented on June 27, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.