Before we explained the rsyslog-v5.x version, because the latest version V8 has changed the configuration file notation, this time v5.x settings written v8.x version for your reference, but the v8.x version is compatible with V5 edition configuration file. It's not the v8.x version that started using this notation, just the latest version of the demo. Back to version v5.x, click Jump .
#工作目录 $WorkDirectory /var/spool/rsyslog/#兼容获取带 "." Host name $preservefqdn on# The owning user $fileowner root# the group $filegroup root# create file Permissions $filecreatemode 0640# Create directory Permissions $dircreatemode 0755# permissions $umask 0022# security permissions $privdroptouser syslog$privdroptogroup root# Templates Template ( name= "General_log" type= "string" string= "%msg%\n") ################################# ########################## #input (type= "Imfile" file= "/web/webback/logs/catalina.out" tag= "Catalina-out" Severity= "Info" facility= "LOCAL5" statefile= "Stat-catalina-out" persiststateinterval= "1") # local5.* @@ 192.168.1.251:514########################################################### #input (type= "Imfile" File= "/web/ Webback/logs/localhost_access/localhost_access_log.txt "tag=" localhost_access "severity=" info "Facility=" Local4 " Statefile= "Stat-localhost_access" persiststateinterval= "1") # local4.* @@192.168.1.251:514*.* @@192.168.1.251:514
This article is from the "Enlightened Grocery store" blog, please be sure to keep this source http://wutou.blog.51cto.com/615096/1788148
Syslog-ng+rsyslog Collection log: Configuration for version rsyslog-v8.x (ii)