rsyslog

rsyslogでsyslogを受信した時刻でlogに出力する

remote hostの時刻がずれている(or UTC) の場合などに、syslogの時刻がずれて嫌な感じなので修正できるか調べた。(ex: vyattaのsyslogがUTCで飛んでくる) formatを変えれば出来たっぽい。 http://www.rsyslog.com/doc/rsyslog_conf_templates.html man rsysl…

rsyslog のtemplate を使ってログファイルを日付、ホスト別に生成

でら便利 http://www.rsyslog.com/doc/rsyslog_conf_templates.html http://www.rsyslog.com/doc/property_replacer.html http://www.rsyslog.com/doc/rsyslog_conf_actions.html $template vyattafilename1, "/var/log/vyatta/%$hostname$%/%$year%%$month%…

rsyslog でファイルのownerとpermission を変更する

rsyslog.conf $DirCreateMode 0750 $FileCreateMode 0640 $DirGroup wheel $FileGroup wheelRHEL系のrpmでinstallされたrsyslogの場合、/etc/init.d/rsyslog のstartの中で"umask 077" が設定されているため、DirCreateMode, FileCreateMode を設定してもuma…

rsyslogでremote host(or network)ごとにlogをわける

2012年にもなってsyslogdを使い続けるのはいかがなものかということと、RHEL6系がrsyslogを採用しているので、今更になってrsyslogdを真面目に調べています。 http://www.rsyslog.com/storing-messages-from-a-remote-system-into-a-specific-file/ http://w…