logging - Make rsyslog ignore missing log file -
i rsyslog print exact logs 2 different files. 1 /var/log/messages done default rhel rule:
*.info;mail.none;authpriv.none;cron.none /var/log/messages
and second $hostname_messages.log stored on shared mountpoint between 2 nodes of veritas cluster storage cluster. done by:
$template percmdnode,"/foo/bar/system/%hostname%_messages.log" *.info;mail.none;authpriv.none;cron.none -?percmdnode
all working fine untill stop cluster service , shared mount point become unavailable rsyslog. in such situation rsyslog exits upon signal 15 , stops logging not shared log file (which pretty obvious) log files.
my question if make rsyslog ignore missing log file , carry on logging when file comes online?
you may able redirect when shared logfile "suspended" http://www.rsyslog.com/action-execonlywhenpreviousissuspended-preciseness/
$template percmdnode,"/foo/bar/system/%hostname%_messages.log" *.info;mail.none;authpriv.none;cron.none -?percmdnode $actionexeconlywhenpreviousissuspended on & /var/log/localbuffer # might ask rsyslog discard here. $actionexeconlywhenpreviousissuspended off
Comments
Post a Comment