New to Logstash, and I've attempted to start with a simple JSON file, though I can't get anything to output to stdout
. It just hangs at Successfully started Logstash API endpoint {:port=>9646}
I've looked at a few posts to try to get some ideas, to no avail:
I've been able to get Logstash to work with the input plugins stdin
and exec
, but I really would like to get it to work with a .json file. Here's what I have:
test.json:
{
"message": "test"
}
logstash.conf:
input {
file {
codec => json
path => ["/db/seed/test.json"]
start_position => "beginning"
}
}
output {
stdout {
codec => "rubydebug"
}
}
Output:
[2020-04-06T18:28:59,741][INFO ][logstash.setting.writabledirectory] Creating directory {:setting=>"path.queue", :path=>"/Users/<project_path>/data/logstash/2020-04-06_22-28-40/queue"}
[2020-04-06T18:28:59,872][INFO ][logstash.setting.writabledirectory] Creating directory {:setting=>"path.dead_letter_queue", :path=>"/Users/<project_path>/data/logstash/2020-04-06_22-28-40/dead_letter_queue"}
[2020-04-06T18:28:59,971][WARN ][logstash.config.source.multilocal] Ignoring the 'pipelines.yml' file because modules or command line options are specified
[2020-04-06T18:28:59,982][INFO ][logstash.runner ] Starting Logstash {"logstash.version"=>"7.6.2"}
[2020-04-06T18:29:00,013][INFO ][logstash.agent ] No persistent UUID file found. Generating new UUID {:uuid=>"dbafbee1-c8e9-44bf-889c-0cc21921765b", :path=>"/Users/<project_path>/data/logstash/2020-04-06_22-28-40/uuid"}
[2020-04-06T18:29:01,781][INFO ][org.reflections.Reflections] Reflections took 39 ms to scan 1 urls, producing 20 keys and 40 values
[2020-04-06T18:29:03,339][WARN ][org.logstash.instrument.metrics.gauge.LazyDelegatingGauge][main] A gauge metric of an unknown type (org.jruby.RubyArray) has been created for key: cluster_uuids. This may result in invalid serialization. It is recommended to log an issue to the responsible developer/development team.
[2020-04-06T18:29:03,400][INFO ][logstash.javapipeline ][main] Starting pipeline {:pipeline_id=>"main", "pipeline.workers"=>8, "pipeline.batch.size"=>125, "pipeline.batch.delay"=>50, "pipeline.max_inflight"=>1000, "pipeline.sources"=>["/Users/<project_path>/logstash.conf"], :thread=>"#<Thread:0x796af4b2 run>"}
[2020-04-06T18:29:04,480][INFO ][logstash.javapipeline ][main] Pipeline started {"pipeline.id"=>"main"}
[2020-04-06T18:29:04,542][INFO ][filewatch.observingtail ][main] START, creating Discoverer, Watch with file and sincedb collections
[2020-04-06T18:29:04,556][INFO ][logstash.agent ] Pipelines running {:count=>1, :running_pipelines=>[:main], :non_running_pipelines=>[]}
[2020-04-06T18:29:04,971][INFO ][logstash.agent ] Successfully started Logstash API endpoint {:port=>9646}
All-in-all, the file input plugin looks like it should be quite simple, but here I am. Any insight or advice would be greatly appreciated.