|
It can usually be achieved by rsyslog on Linux centralized management system log, in which case there is usually a log server, and then configure each machine to write to its own log by rsyslog on the remote log server.
This assumes that there are two servers, one as a server system log (such as machine name logmaster), the other as a client logs (such as machine name logclient)
Log Server Configuration
First modify /etc/rsyslog.conf log master file on the machine, which will be canceled the following four lines of comments
$ ModLoad imudp
$ UDPServerRun 514
$ ModLoad imtcp
$ InputTCPServerRun 514
And then restart the service rsyslogd
$ Sudo /etc/init.d/rsyslog restart
Log client configuration
/etc/rsyslog.conf file modification log node machine
Add the following line at the end, the purpose is to allow Linux to write the log, while writing a log mater to the remote machine
*. * @logmaster
And then restart the service rsyslogd
$ Sudo /etc/init.d/rsyslog restart
test
On Linxu can use the logger command to write to a system log, such as
$ Logger 'hello world'
And then view the log / var / log / messages file on the master machine, you can see something like this
Jun 28 14:58:16 logclient root: hello world
Including date, log source (machine name), process name and contents of the log. |
|
|
|