How To Move CSV or TXT to Elasticsearch

In this article, we will move a csv file we created, to elasticsearch with logstash. You can also move TXT files to elasticsearch in the same way.

We create the CSV file as follows and copy it to the /home/elastic directory on the server where logstash is installed. You can use the following articles to install logstash and elasticsearch.

How To Install Elasticsearch On Centos“,

How To Install Logstash On Centos

After creating the CSV file, we go to a directory and create a configuration file with the contents as follows.

Then we move the csv file to elasticsearch with the command below.

If you want to move the changes  in the CSV file to the elasticsearch continuously by logstash, you must execute this command with nohup like below.

Then we can see the records on kibana by typing GET command to Devtools as below.

You can access other articles from the menu to get more information about ELK.

dbtut
Author: dbtut

We are a team with over 10 years of database management and BI experience. Our Expertises: Oracle, SQL Server, PostgreSQL, MySQL, MongoDB, Elasticsearch, Kibana, Grafana.

Leave a Reply

Your email address will not be published. Required fields are marked *