From the documentation page...

[omprog] Executes the configured program and feeds log messages to that binary via stdin. The binary is free to do whatever it wants with the supplied data. If the program terminates, it is re-started. If rsyslog terminates, the program’s stdin will see EOF. The program must then terminate.

So don't expect rsyslog to terminate the program, the program must recognize the EOF on stdin and exit of its own accord.

Regards,


On 6/4/20 12:30 PM, Fourhundred Thecat via rsyslog wrote:
Hello,

I am using omprog to send mail logs to my script:

mail.*  action(type="omprog" name="blacklist"
binary="/usr/local/sbin/blacklist.py" template="long-iso")

It works well, but I have noticed that when I stop rsyslog, the script
is not terminated, but continues running. I can see the process with "ps".

Shouldn't the scrip be terminated when rsyslog exits? What should happen
when I start rsyslog, should it start new instance, or use the already
running instance?

Is this correct behavior ?

thanks,
_______________________________________________
rsyslog mailing list
https://lists.adiscon.net/mailman/listinfo/rsyslog
http://www.rsyslog.com/professional-services/
What's up with rsyslog? Follow https://twitter.com/rgerhards
NOTE WELL: This is a PUBLIC mailing list, posts are ARCHIVED by a myriad of 
sites beyond our control. PLEASE UNSUBSCRIBE and DO NOT POST if you DON'T LIKE 
THAT.


_______________________________________________
rsyslog mailing list
https://lists.adiscon.net/mailman/listinfo/rsyslog
http://www.rsyslog.com/professional-services/
What's up with rsyslog? Follow https://twitter.com/rgerhards
NOTE WELL: This is a PUBLIC mailing list, posts are ARCHIVED by a myriad of 
sites beyond our control. PLEASE UNSUBSCRIBE and DO NOT POST if you DON'T LIKE 
THAT.

Reply via email to