rsylog: Accept remote log messages over TCP.
[matthijs/servers/tika.git] / etc / rsyslog.conf
index 9d1aac12bb885a82e4aed60f8438c6bd8c0cd537..fee816c5bcb619f3b50c7b37a8d8e9aa3d3fe4d6 100644 (file)
@@ -12,6 +12,9 @@ $ModLoad imuxsock # provides support for local system logging
 $ModLoad immark   # provides --MARK-- message capability
 $MarkMessagePeriod  900 # mark messages appear every 15 Minutes
 
+$ModLoad imtcp
+$InputTCPServerRun 514 # Accept TCP connections on the default syslog port
+
 ###########################
 #### GLOBAL DIRECTIVES ####
 ###########################
@@ -52,7 +55,11 @@ $MainMsgQueueSaveOnShutdown on
 #### Local logging ####
 #######################
 
-#
+# Discard all log entries not locally generated (note that the ~ here is the
+# "discard" action, preventing the rules below from bein ran on these messages.
+if $fromhost-ip != '127.0.0.1' then ~
+
+
 # Log each facility into its own log
 auth,authpriv.*                        /var/log/rsyslog/auth.log
 cron.*                         -/var/log/rsyslog/user.log