I want to receive "bookId","bookTitle","bookAuthor" separately.
Now I can access only top-level field "book".
Part of my current logstash configuration file:
output {
csv {
# elastic field name
fields => ["books"]
# This is path where we store output.
path => "/Users/user/Desktop/csv-export.csv"
}
}
I tried many different options, for example "[books][bookId]", ["books"]["bookId"] or ["books"."bookId"] , but this does not work.
Would be grateful for any advice.
// Using Logstash ver. 7.8.0 and ElasticSearch ver. 7.7.0
@grumo35, unfortunately no )
I guess that the problem is that I use a non-standard data source - ElasticSearch (through the corresponding plugin).
Typically, an ES is a data receiver.
Probably the plugin "logstash-output-csv" can only parse simple json objects, not ES documents.
@grumo35, now I have some errors with json parsing.
But the error description contains information about nested attributes.
So, I guess now I have access to nested field "books"
and have to change my output block in logstash config file.
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.