Now when logstash filter get eof, it seems that logstash filter is running yet, but file doesn\'t have more logs to output to elasticsearch index.
How can i get out of l
I solve the problem using exec on output of logstash filter, and create a bash script to kill logstash process.
In logstash filter:
input
{
...
}
filter
{
...
}
output
{
exec
{
command => "sh kill_logstash.sh"
}
...
}
In bash script (kill_logstash.sh):
#!/bin/bash
echo 'Terminou a leitura do ficheiro'
pkill -f logstash
exit 0
Same Problem: How to automatically kill a logstash agent when tests are done?
there is no concept of eof in logstash. logstash continuous monitor input file . if any change happen in file it will send to filter . if you want to monitor multiple file than you can give multiple files block in input section.