Why the "exec" input in logstash does not work?

Hi,

I failed to load shell script output to ELK with "exec" input plugin in logstash. Is there anything misconfigured in my configure file?

Below is my logstash configuraitons.

input {
  exec {
    command => "bash /root/logstash/logstash-8.6.2/scripts/example.sh"
    interval => 5 
  }
}
filter {
}

output {
 elasticsearch {
   hosts => ["https://####:9200"]
   api_key => "####"
   index => "myindex"
  }
}

I can find the output if I ran the script separately, but when I start the logstash it showed nothing and I can not query it in Kibana.

Thanks,

Johnny

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