# Input command not executing

**URL:** <https://discuss.elastic.co/t/input-command-not-executing/262137>\
**Category:** Logstash\
**Created:** [January 25, 2021, 4:22pm UTC](https://discuss.elastic.co/t/input-command-not-executing/262137 "2021-01-25T16:22:49Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Christophe\_Dumont](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christophe_dumont/32/82868_2.png) [@Christophe\_Dumont](https://discuss.elastic.co/u/Christophe_Dumont)\
**Post date:** [January 25, 2021, 4:22pm UTC](https://discuss.elastic.co/t/input-command-not-executing/262137/1 "2021-01-25T16:22:49Z")

</div>

Hello,

I'm trying to run a command every 10 seconds but it's not working.  
Here's my conf file :

input {  
exec {  
command =\> "/home/xxx/CICFlow/bin/cfm \> '/tmp/logstash.log'"  
interval =\> 10  
}  
}

---

<div class="post-metadata">

**Author:** ![Badger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/badger/32/25190_2.png) [@Badger](https://discuss.elastic.co/u/Badger)\
**Post date:** [January 25, 2021, 4:37pm UTC](https://discuss.elastic.co/t/input-command-not-executing/262137/2 "2021-01-25T16:37:12Z")

</div>

> [@Christophe\_Dumont](#):
>
> it's not working

What does that mean?

---

<div class="post-metadata">

**Author:** ![Christophe\_Dumont](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christophe_dumont/32/82868_2.png) [@Christophe\_Dumont](https://discuss.elastic.co/u/Christophe_Dumont)\
**Post date:** [January 25, 2021, 4:48pm UTC](https://discuss.elastic.co/t/input-command-not-executing/262137/3 "2021-01-25T16:48:50Z")

</div>

> [@Christophe\_Dumont](#):
>
> /home/xxx/CICFlow/bin/cfm \> '/tmp/logstash.log

The command **/home/xxx/CICFlow/bin/cfm** doesn't send any logs to **/tmp/logstash.log**

---

<div class="post-metadata">

**Author:** ![Christophe\_Dumont](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christophe_dumont/32/82868_2.png) [@Christophe\_Dumont](https://discuss.elastic.co/u/Christophe_Dumont)\
**Post date:** [January 26, 2021, 4:48pm UTC](https://discuss.elastic.co/t/input-command-not-executing/262137/4 "2021-01-26T16:48:12Z")

</div>

The command should parse a pcap log file and transform it in a csv file.  
Here's the config file of logstash :

**input {**  
**exec {**  
**command =\> "/home/cdt/CICFlow/bin/cfm /var/log/suricata/log.pcap.1611678832 /tmp/"**  
**interval =\> 10**  
**}**  
**}**

**filter {**  
**}**

**output {**  
**file {**  
**path =\> "/tmp/logstash.log"**  
**}**  
**}**

The /tmp/logstash.log :  
**{"command":"/home/cdt/CICFlow/bin/cfm","@timestamp":"2021-01-26T10:37:14.163Z","host":"0.0.0.0","message":"","@version":"1"}**  
**{"command":"/home/cdt/CICFlow/bin/cfm","@timestamp":"2021-01-26T10:37:24.163Z","host":"0.0.0.0","message":"","@version":"1"}**

But no csv files found in /tmp.  
Is it a right acces to the files ? Logstash's executed as logstash user. The pcap files belongs to suricata.

---

<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:** [February 23, 2021, 4:48pm UTC](https://discuss.elastic.co/t/input-command-not-executing/262137/5 "2021-02-23T16:48:28Z")

</div>

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