Per Configuring Logstash to Use Dead Letter Queues:
Dead letter queues are disabled by default. To enable dead letter queues, set the dead_letter_queue_enable option in the logstash.yml settings file:
dead_letter_queue.enable: true
I enabled option via Configuring Logstash for Docker | Logstash Reference [6.2] | Elastic:
# grep DEAD_LETTER_QUEUE.ENABLE docker-compose.override.yml
- DEAD_LETTER_QUEUE.ENABLE=true
#
Processing Events in the Dead Letter Queue
# cat pipeline/10-input-dead_letter_queue.conf
input {
dead_letter_queue {
path => "/usr/share/logstash/data/dead_letter_queue/main"
}
}
#
and now, whenever I start logstash, I'm getting following errors:
logstash11 | [2018-02-21T16:04:40,494][ERROR][logstash.pipeline ] Error registering plugin {:pipeline_id=>"main", :plugin=>"<LogStash::Inputs::DeadLetterQueue path=>\"/usr/share/logstash/data/dead_letter_queue/main\", id=>\"dbb698a5fbc95fc57c4d4035e6aea289b838d574786111ae96ee36dc6438b7fc\", enable_metric=>true, codec=><LogStash::Codecs::Plain id=>\"plain_9c74df7f-06ba-46db-a683-a034892e1b8c\", enable_metric=>true, charset=>\"UTF-8\">, pipeline_id=>\"main\", commit_offsets=>true>", :error=>"/usr/share/logstash/data/dead_letter_queue/main/main", :thread=>"#<Thread:0x749b0f73 run>"}
logstash11 | [2018-02-21T16:04:40,886][ERROR][logstash.pipeline ] Pipeline aborted due to error {:pipeline_id=>"main", :exception=>java.nio.file.NoSuchFileException: /usr/share/logstash/data/dead_letter_queue/main/main, :backtrace=>["sun.nio.fs.UnixException.translateToIOException(sun/nio/fs/UnixException.java:86)", "sun.nio.fs.UnixException.asIOException(sun/nio/fs/UnixException.java:111)", "sun.nio.fs.LinuxWatchService$Poller.implRegister(sun/nio/fs/LinuxWatchService.java:246)", "sun.nio.fs.AbstractPoller.processRequests(sun/nio/fs/AbstractPoller.java:260)", "sun.nio.fs.LinuxWatchService$Poller.run(sun/nio/fs/LinuxWatchService.java:364)", "java.lang.Thread.run(java/lang/Thread.java:748)"], :thread=>"#<Thread:0x749b0f73 run>"}
logstash11 | [2018-02-21T16:04:40,909][ERROR][logstash.agent ] Failed to execute action {:id=>:main, :action_type=>LogStash::ConvergeResult::FailedAction, :message=>"Could not execute action: LogStash::PipelineAction::Create/pipeline_id:main, action_result: false", :backtrace=>nil}
second part of my issue is: I'd like for events from DLQ to be display via:
output {
stdout {
codec => rubydebug { metadata => true }
}
}
however, I already have output as part of pipeline, how would I display only events from DLQ?
Please advise.