I need to feed JSON data from a PostGreSQL table as input to logstash. For this, I shall use the JDBC input plugin. In Kibana I need to display only selective fields from this JSON. So, somewhere I need to parse this JSON.
From the documentation, it appears to me that the json codec plugin in logstash can help me to achieve the same. Can you please provide some example of the json codec plugin?
I'm not sure I understand the problem but I'll give it a try. I've used the JDBC Logstash input plugin with Oracle and MySQL DBs. The plugin handles the creation of the JSON (by default using the JSON codec I guess), creating a field for each column. I've been able to manage the number of fields by using the SELECT statement identifying only the columns I want.
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.