Re: [rsyslog] errors from "omprog" script

2023-07-22 Thread Joan Sala via rsyslog
You can use the "output" option for that, if I recall correctly: https://www.rsyslog.com/doc/v8-stable/configuration/modules/omprog.html#output Regards On Tue, Jul 11, 2023, 07:11 Fourhundred Thecat via rsyslog < rsyslog@lists.adiscon.com> wrote: > Hello, > > I am using custom python script

[rsyslog] errors from "omprog" script

2023-07-10 Thread Fourhundred Thecat via rsyslog
Hello, I am using custom python script to process logs, and ban offending IPs: local0.* action(type="omprog" name="asterisk" binary="/usr/local/sbin/asterisk.py") When my script generates some error, I don't see it anywhere in the logs (but I do see python errors when I run my script

Re: [rsyslog] errors from omprog script

2021-01-16 Thread Joan Sala via rsyslog
Normally you should test your script independently before integrating it with rsyslog, it's far easier. Anyway, the output setting will also capture these kind of errors. On Sat, Jan 16, 2021, 04:18 Fourhundred Thecat via rsyslog < rsyslog@lists.adiscon.com> wrote: > > On 2021-01-15 19:57, John

Re: [rsyslog] errors from omprog script

2021-01-15 Thread Fourhundred Thecat via rsyslog
> On 2021-01-15 19:57, John Chivian wrote: The python script should trap its own stderr (and/or stdout) and write it to a separate file. but what if there is syntax error in my script? Where can I see this error? thanks, ___ rsyslog mailing list

Re: [rsyslog] errors from omprog script

2021-01-15 Thread John Chivian via rsyslog
The python script should trap its own stderr (and/or stdout) and write it to a separate file. > On Jan 15, 2021, at 12:04, Fourhundred Thecat via rsyslog > wrote: > > Hello > > I am using omprog, to send logs to my script: > > mail.* action(type="omprog" binary="/usr/bin/blacklist.py

Re: [rsyslog] errors from omprog script

2021-01-15 Thread Joan Sala via rsyslog
You can use the 'output' setting of the omprog action (see details in the reference doc). Or, you can make your program write its own log files. On Fri, Jan 15, 2021, 19:04 Fourhundred Thecat via rsyslog < rsyslog@lists.adiscon.com> wrote: > Hello > > I am using omprog, to send logs to my

[rsyslog] errors from omprog script

2021-01-15 Thread Fourhundred Thecat via rsyslog
Hello I am using omprog, to send logs to my script: mail.* action(type="omprog" binary="/usr/bin/blacklist.py ... ) If my script generates errors, where can I see these errors? I looked in my main syslog log file, but there is nothing. I can run my script from commandline, and see the