Logstash exec plugin error directory not found

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:

exec {
    command => 'file.py'
}

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

[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?

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