Logstash - no response

I'm trying to upload json files to Elastic via Logstash.

When I run logstash, it connects to Elastic, declares that it's starting a pipeline, but doesn't seem to do anything. I tried to deliberately enter a non-existing json file as input, but didn't got the error I was expecting.

The config file:

input {
file {
path=>
start_position=>beginning
#sincedb_path => "/dev/null"
}
}
filter {
json {
source => "message"
#skip_on_invalid_json => true
remove_field => [ "message" ]
}
}
output {
elasticsearch {
hosts => ":9243"
index => "birth"
user => "elastic"
password =>""
ssl => true
}
stdout {}
}

Output when running:
...
Successfully started Logstash API endpoint {:port=>9600}
...
Restored connection to ES instance
...
] New Elasticsearch output {:class=>"LogStash::Outputs::ElasticSearch", :hosts=>["....
...
Starting pipeline {:pipeline_id=>"main", "pipeline.workers"=>4, "pipeline.batch.size"=>125, "pipeline.batch.delay"=>5, "pipeline.max_inflight"=>500, :thread=>"#<Thread:0x3aa27e59 run>"}

(then nothing happens).

I tried to deliberately enter a non-existing json file as input, but didn't got the error I was expecting.

Correct, a filename pattern that expands to nothing isn't an error.

This is an extremely frequently asked question and the problem is probably that Logstash is tailing the file. It could also be a lack of necessary permissions to read the file or any of the directories leading up to the flie.

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