AS201281 Wiki

Your check engine light is on!

User Tools

Site Tools


sysadmin:logs

Differences

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

Link to this comparison view

Next revision
Previous revision
sysadmin:logs [2013/09/18 17:54] – created Guillaume Mazoyersysadmin:logs [2021/01/04 20:41] (current) – external edit 127.0.0.1
Line 7: Line 7:
 ==== On the target host ==== ==== On the target host ====
  
-Append the following line to the ///etc/rsyslog.conf// file and restart the rsyslog service.+Append the following line to the ''/etc/rsyslog.conf'' file and restart the rsyslog service.
 <code>*.* @IP_ADDRESS_OF_THE_LOG_SERVER</code> <code>*.* @IP_ADDRESS_OF_THE_LOG_SERVER</code>
  
 ==== On the log server ==== ==== On the log server ====
  
-Uncomment those lines in ///etc/rsyslog.conf// file.+Uncomment those lines in ''/etc/rsyslog.conf'' file.
 <code># provides UDP syslog reception <code># provides UDP syslog reception
 $ModLoad imudp $ModLoad imudp
Line 21: Line 21:
 $InputTCPServerRun 514</code> $InputTCPServerRun 514</code>
  
-Add a file in the ///etc/rsyslogd// directory for each remote logging host in with the following content:+Add a file in the ''/etc/rsyslog.d'' directory for each remote logging host in with the following content:
 <code>$template myhostname, "/var/log/%HOSTNAME%/%PROGRAMNAME%.log" <code>$template myhostname, "/var/log/%HOSTNAME%/%PROGRAMNAME%.log"
 if $fromhost-ip == 'HOST_IP_ADDRESS' then ?myhostname</code> if $fromhost-ip == 'HOST_IP_ADDRESS' then ?myhostname</code>
  
 This will store log files of remote hosts in different folders following the **hostname**, with filenames corresponding to the name of the program that emitted logs. This will store log files of remote hosts in different folders following the **hostname**, with filenames corresponding to the name of the program that emitted logs.
sysadmin/logs.1379526846.txt.gz · Last modified: 2021/01/04 20:41 (external edit)