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

**URL:** https://discuss.elastic.co/t/why-the-exec-input-in-logstash-does-not-work/328808
**Category:** Logstash
**Created:** [March 29, 2023, 10:02am UTC](https://discuss.elastic.co/t/why-the-exec-input-in-logstash-does-not-work/328808 "2023-03-29T10:02:24Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![JohnnyLee](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/johnnylee/32/119129_2.png) [@JohnnyLee](https://discuss.elastic.co/u/JohnnyLee)
#### Post date: [March 29, 2023, 10:02am UTC](https://discuss.elastic.co/t/why-the-exec-input-in-logstash-does-not-work/328808/1 "2023-03-29T10:02:24Z")

</div>

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.

```auto
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

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)
#### Post date: [April 26, 2023, 10:03am UTC](https://discuss.elastic.co/t/why-the-exec-input-in-logstash-does-not-work/328808/2 "2023-04-26T10:03:21Z")

</div>

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