I have a script which I'd like to capture the output from. I assumed that as long as I had it started by my splunkforwarder with an interval=0 it would run for ever and capture anything the script generates. But doesn't appear so.
[script://./bin/spidertrap.py] interval = 0 index = main sourcetype = spidertrap source = spidertrap.py disabled = 0
The script source can be found here -
I've verified that Splunk is running the script. If I run the script directly I get output to the console I expect.
with open('out.txt', 'w') as f: print >> f, 'Filename:', filename # Python 2.x print('Filename:', filename, file=f) # Python 3.x