Elasticsearch takes long time to update simple index

I have installed ES and Logstash 7.2.0 in 2 servers and I tried pushing a simple text file from Logstash to ES. The Logstash seems to send the data quickly, however, the ES takes about 5 mins (everytime) to update this data in its index.

ES yml:

cluster.name: myes
node.name: elk04
bootstrap.memory_lock: true
network.host: 110.13.7.64
http.port: 9200
cluster.initial_master_nodes: ["elk04"]

Logstash conf:

input {
        file {
        path => "/etc/logstash/conf.d/mytest.txt"
        start_position => "beginning"
        sincedb_path => "/dev/null"
        }
        }
        output {
           elasticsearch {
               hosts => ["<esIP>:9200"]
               index => "text"
               doc_as_upsert =>true}
               stdout { codec => rubydebug }
        }

the contents of the text file is just 4 lines for testing:

this is a test text
for logstash updation
adding another line
this is to check updates

Please help me out with this.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.