yasir khatri
yasir khatri

Reputation: 101

Logstash not producing output or inserting to elastic search

When i execute the configuration file using the command bin\logstash -f the configfile.conf. There is not display on the console just the logs by logstash.

Here is the configuation file: input

{
    file
    {
        path => "F:\ELK\50_Startups.csv"
        start_position => "beginning"
    }
}

filter 
{
    csv
    {
        separator => ","
        columns => ["R&D","Administration","Marketing","State","Profit"]
    }
}

output
{
    elasticsearch
    {
        hosts => ["localhost:9200"]
        index => ["Startups"]
    }
    stdout{}
}

Upvotes: 1

Views: 178

Answers (1)

do the input file (50_Startups.csv) has fresh data written to? if not, it might be that logstash already stored the read offset as the last line, and it would not re-read it on future runs, unless you delete the sincedb_path offset files, of just add the following config:

sincedb_path => "/dev/null"

That would force logstash to re-parse the file.

see more info on files offsets here:https://www.elastic.co/guide/en/logstash/current/plugins-inputs-file.html#_tracking_of_current_position_in_watched_files

from it:

By default, the sincedb file is placed in the data directory of Logstash with a filename based on the filename patterns being watched

Upvotes: 1

Related Questions