In the conf file , how can I define which fields I want to upload to the ElasticSearch ?
My Json file contain one row that need to be uploaded to the ElasticSearch , So after the upload I would like to see I row under the index with the fields and values compatibility.
For example , this is my conf file:
input {
file{
path => ["/tmp/y4.json"]
type => "json"
start_position => "beginning"
sincedb_path => "/dev/null"
}
}
filter{
grok {
match => [ 'message', '(?"TestName":.*"Agent":"[^"]+")' ]
}
json {
source => "message"
}
}
In the conf file , how can I define which fields I want to upload to the Elasticsearch ?
Elasticsearch gets the whole event (except the @metadata field). If you don't want to include particular fields you have to delete them with e.g. the mutate or the prune filter.
When I'm uploading a flat Json file (All tags in level 1) I don't have a problem.
When I'm uploading a complex Json (Tags with more then 1 level) , I have a problem. I don't have the fields I need , only message and in some cases the value of message is "{" or "}",
It's written that it won't work well with nested JSON structs and I need a simple hash of key/value pairs.
Is there a way to upload nested JSON structs ?
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.