Home > OS >  Rsyslog service configuration
Rsyslog service configuration

Time:10-04

I want to use a centos6.5 do log backups for the other two servers, but now the system log backup all together, can respectively for each server in a separate file? O great god only recruit

CodePudding user response:

In the configuration/etc/rsyslog. Conf # # # # # # # # GLOBAL DIRECTIVES above with similar configuration:
The template RemoteLogs, "/data/log/HOSTNAME/% % % % PROGRAMNAME. Log" *
*. *? RemoteHost

This format, what can define your own store directory:
Similar and $template RemoteHost, "/data/% $YEAR % % % % $MONTH - $DAY % %/% FROMHOST - IP. The log"
*. *? RemoteHost

CodePudding user response:

reference 1st floor zhouchao6 response:
in the configuration/etc/rsyslog. Conf # # # # # # # # GLOBAL DIRECTIVES above with similar configuration:
The template RemoteLogs, "/data/log/HOSTNAME/% % % % PROGRAMNAME. Log" *
*. *? RemoteHost

This format, what can define your own store directory:
Similar and $template RemoteHost, "/data/% $YEAR % % % % $MONTH - $DAY % %/% FROMHOST - IP. The log"
*. *? RemoteHost

Custom folders in the list need to be built or at the time of execution back to generate its own?

CodePudding user response:

refer to the second floor weixin_42106889 response:
Quote: refer to 1st floor zhouchao6 response:
in the configuration/etc/rsyslog. Conf # # # # # # # # GLOBAL DIRECTIVES above with similar configuration:
The template RemoteLogs, "/data/log/HOSTNAME/% % % % PROGRAMNAME. Log" *
*. *? RemoteHost

This format, what can define your own store directory:
Similar and $template RemoteHost, "/data/% $YEAR % % % % $MONTH - $DAY % %/% FROMHOST - IP. The log"
*. *? RemoteHost

Custom folders in the list need to be built or at the time of execution back to generate its own?


Restart the rsyslog service, no, will be automatically created

CodePudding user response:

After this configuration, what are the contents of the backup?

CodePudding user response:

The
reference 4 floor weixin_42106889 reply:
after this configuration, backup the content of what?


The first is the PROGRAMNAME %. The log is way backup process name, the second didn't try, detailed, yourself baidu next usage
  • Related