# Logstash exec plugin error directory not found

**URL:** <https://discuss.elastic.co/t/logstash-exec-plugin-error-directory-not-found/280444>\
**Category:** Logstash\
**Created:** [August 4, 2021, 2:19pm UTC](https://discuss.elastic.co/t/logstash-exec-plugin-error-directory-not-found/280444 "2021-08-04T14:19:49Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Hamza\_El\_Aouane](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/hamza_el_aouane/32/82411_2.png) [@Hamza\_El\_Aouane](https://discuss.elastic.co/u/Hamza_El_Aouane)\
**Post date:** [August 4, 2021, 2:19pm UTC](https://discuss.elastic.co/t/logstash-exec-plugin-error-directory-not-found/280444/1 "2021-08-04T14:19:49Z")

</div>

I am working with logstash for syslog processing.

Right now, I have logstash and elastic search for data processing and grafana for visualisation. Those data that I am receiving, I am saving them to local disk as csv and json.

The original idea, was to have the syslog saved on local hard disk, and with a python script, open the file read its content and push it to azure service bus.

today I found out that logstash has a plugin to execute commands, or scripts, which is just about perfect for what I am trying to achieve and will be running in real time, rather than having it scheduled to run once a day using windows scheduler.

So I started by installing the plugin.

and added the configuration to my logstash, as this:

```auto
exec {
    command => 'file.py'
}

```

I have created a simple hello world script to test if it works, but I am getting the following error.

```auto
[main] Pipeline worker error, the pipeline will be stopped {:pipeline_id=>"main", :error=>"(ENOENT) No such file or directory - file.py"

```

I tried to pass the full path also but is not working and keep getting the same error.

anyone can tell me what am I doing wrong at this stage?

---

<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:** [September 1, 2021, 2:20pm UTC](https://discuss.elastic.co/t/logstash-exec-plugin-error-directory-not-found/280444/2 "2021-09-01T14:20:06Z")

</div>

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