User Tools

Site Tools


remote_rsyslog

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
remote_rsyslog [2013/04/23 23:44]
kyxap создано
remote_rsyslog [2013/12/15 16:32] (current)
kyxap
Line 1: Line 1:
-====== Настройка rsyslog для удаленного протоколирования в Debian ​wheezy ​======+{{tag>​debian wheezy rsyslog logs}}====== Настройка rsyslog для удаленного протоколирования в Debian ======
  
 ==== Клиент ==== ==== Клиент ====
 +
 **/​etc/​rsyslog.d/​logclient.conf** **/​etc/​rsyslog.d/​logclient.conf**
 <​code>​ <​code>​
-# TCP 
-*.*     ​@@123.123.123.123:​514 
 # UDP # UDP
 *.*     ​@123.123.123.123:​514 *.*     ​@123.123.123.123:​514
 +</​code>​
 +
 +==== Сервер ====
 +Создадим директорию для логов
 +  # mkdir -p /​var/​log/​remote/​
 +  # chmod 700 /​var/​log/​remote/​
 +
 +**/​etc/​rsyslog.d/​logserver.conf**
 +<​code>​
 +# log settings for host
 +
 +# loading UDP listener module
 +$ModLoad imudp
 +
 +# bind listener to specified IP
 +$UDPServerAddress 123.123.123.123
 +
 +# allow remote client
 +$AllowedSender UDP, 321.321.321.321
 +
 +# template for all remote clients
 +$template RemoteHost,"/​var/​log/​remote/​%HOSTNAME%.log"​
 +
 +# ruleset for remote clients
 +$RuleSet remote
 +*.* ?RemoteHost
 +
 +# applying remote ruleset to UDP listener
 +$InputUDPServerBindRuleset remote
 +
 +# run listener
 +$UDPServerRun 514
 </​code>​ </​code>​
remote_rsyslog.1366760699.txt.gz · Last modified: 2013/04/23 23:44 by kyxap