Exec input filter in logstash not capturing entire output from python script

Here is what my configuration looks like ...

input {
exec {
command => 'c:\Python27\python C:\J\logstash\pythonscripts\test.py'
interval => 10000
}
}
output {
stdout {
codec => rubydebug
}
}

When I execute this python script on commandline, as it does some processing - so there is a delay before the output is printed onto the console.
However, whatever is the output doesnt make it to the pipeline.
Also, before the processin, whateever I output to the console, that gets captured in the pipeline.
Is there like a timeout thingie that pipeline waits for before disconnecting from script output?

Any help would be greatly appreciated!

Can you try to produce a minimal example that exhibits the problem? What if you have a one-line Python script like

print 'hello'

does that get captured?

yes, that works fine. Even in this script as I said, most the output is captured except until there is that processing and then the output.

Ok so here is a little something I tried.
I introduced a delay in my script. So now it is something like ...
print 'hello1'
sleep (10)
print 'hello2'

What I noticed in logstash - the pipeline waited until 10 seconds and then received both hello1 and hello2 events.
so it doesnt look like delay is an issue here.
Let me look up my script.

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