シスログ ネットワーク経由でログを受信する

syslogd

起動オプションを設定

vi /etc/sysconfig/syslog
SYSLOGD_OPTIONS="-m 0"
↓「-r」を新たに追加する
SYSLOGD_OPTIONS="-m 0 -r"

再起動

/etc/init.d/syslogd restart

ポート確認

netstsat -lanput | grep syslog
udp        0      0 0.0.0.0:514                 0.0.0.0:*                               3531/syslogd        

参考http://armadillo.atmark-techno.com/howto/ValidateSyslog-aj

rsyslog

rsyslogは起動オプションではなく、設定ファイルで実施する。
/etc/rsyslog.conf :共通設定ファイル
/etc/rsyslog.d/*.conf :個別の設定ファイル
/etc/sysconfig/rsyslog :起動オプション

ログ受信設定

# vi /etc/rsyslog.conf
#$ModLoad imtcp
#$UDPServerRun 514
  ↓
$ModLoad imudp
$UDPServerRun 514

ポート確認

netstsat -lanput | grep rsyslog
udp        0      0 0.0.0.0:514                 0.0.0.0:*                               6259/rsyslogd
udp        0      0 :::514                      :::*                                    6259/rsyslogd     

参考:http://easyramble.com/configure-rsyslog.html

※テストは後程。。。。

おすすめの記事