Hello,
I am running rsyslog 3.18.0 provided with Debian 5.0 (lenny/stable)
using the default configuration + ommail configuration (see below).
When SMTP server is not available (either dns name mistyped or network
outage), running command
logger Pattern.something
that should result in email being sent, hangs and almost everything
else becomes unresponsive (cron, sshd).
I do realize that it has something to do with lack of async queueing
by default, but I don't understand why logging commands just hang
seemingly forever.
The configuration itself is as follows:
$ModLoad ommail
$template mailSubject,"RSYSLOG: %msg%"
$ActionMailSMTPServer smtp.server.com
$ActionMailFrom [email protected]
$ActionMailSubject mailSubject
$ActionMailEnableBody off
$ActionExecOnlyOnceEveryInterval 900
$ActionMailTo [email protected]
if $msg contains 'Pattern.' then :ommail:
.... # Quite many more such rules
My aim is to have rsyslog configured so that when SMTP server is
unavailable, corresponding mails just don't get delivered, and first
of all to make sure the whole system does not hang/slow down because
of this. As I have quite many actions sending emails I'd rather not
configure per-action queue.
For now I have resolved the problem by adding:
$WorkDirectory /var/log/queue
$MainMsgQueueType LinkedList
$MainMsgQueueFileName Main
$MainMsgQueueMaxDiskSpace 1g
$MainMsgQueueSaveOnShutdown on
But I am not sure if this is the best solution and why there is a
problem in the first place.
Thanks!
Oleg Mürk
_______________________________________________
rsyslog mailing list
http://lists.adiscon.net/mailman/listinfo/rsyslog
http://www.rsyslog.com