[open-ils-commits] r842 - ESI-Examples/sys/etc/syslog-ng (dmcmorris)

svn at svn.open-ils.org svn at svn.open-ils.org
Tue Mar 23 12:08:13 EDT 2010


Author: dmcmorris
Date: 2010-03-23 12:08:10 -0400 (Tue, 23 Mar 2010)
New Revision: 842

Added:
   ESI-Examples/sys/etc/syslog-ng/syslog-ng.conf-MultiServer-Logger+App
Log:
Adding a syslog-ng config that actually works when your logger is also an app box

Added: ESI-Examples/sys/etc/syslog-ng/syslog-ng.conf-MultiServer-Logger+App
===================================================================
--- ESI-Examples/sys/etc/syslog-ng/syslog-ng.conf-MultiServer-Logger+App	                        (rev 0)
+++ ESI-Examples/sys/etc/syslog-ng/syslog-ng.conf-MultiServer-Logger+App	2010-03-23 16:08:10 UTC (rev 842)
@@ -0,0 +1,98 @@
+#    syslog-ng.conf for multi-server environment 
+#    (shared app/central log server version)
+#    Copyright (C) 2010 Equinox Software Inc. Don McMorris <dmcmorris at esilibrary.com>
+#
+#    This program is free software; you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License as published by
+#    the Free Software Foundation; either version 2 of the License, or
+#    (at your option) any later version.
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program; if not, write to the Free Software
+#    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
+options {
+        chain_hostnames(off);
+        sync(10);
+        stats(3600);
+        owner(root);
+        group(admin);
+        dir_group(admin);
+        dir_perm(0750);
+        perm(0640);
+        create_dirs(yes);
+        time_reopen(10);
+        keep_hostname(yes);
+};
+
+source s_all {
+        internal();
+        unix-stream("/dev/log");
+        file("/proc/kmsg");
+        udp(ip(192.168.0.98) port(514));
+        tcp(ip(192.168.0.98) port(514) max-connections(100));
+};
+
+
+destination d_external_osrfsys {                    # local0
+  file("/var/log/evergreen/prod/$YEAR/$MONTH/$DAY/osrfsys.$HOUR.log",
+    template("$YEAR-$MONTH-$DAY $HOUR:$MIN:$SEC $HOST $MSG\n") template-escape(no)); };
+destination d_external_osrfact {                    # local1
+  file("/var/log/evergreen/prod/$YEAR/$MONTH/$DAY/activity.log",
+    template("$YEAR-$MONTH-$DAY $HOUR:$MIN:$SEC $HOST $MSG\n") template-escape(no)); };
+destination d_external_transport {              # local2
+  file("/var/log/evergreen/prod/$YEAR/$MONTH/$DAY/transport.log",
+    template("$YEAR-$MONTH-$DAY $HOUR:$MIN:$SEC $HOST $MSG\n") template-escape(no)); };
+destination d_external_postgres {               # local3
+  file("/var/log/evergreen/prod/$YEAR/$MONTH/$DAY/pg.$HOUR.log",
+    template("$YEAR-$MONTH-$DAY $HOUR:$MIN:$SEC $HOST $MSG\n") template-escape(no)); };
+destination d_external_osrferr {                    # local0-3 LOG_ERROR
+  file("/var/log/evergreen/prod/$YEAR/$MONTH/$DAY/osrferror.log",
+    template("$YEAR-$MONTH-$DAY $HOUR:$MIN:$SEC $HOST $MSG\n") template-escape(no)); };
+destination d_external_pgerr {                  # local4 LOG_ERROR
+  file("/var/log/evergreen/prod/$YEAR/$MONTH/$DAY/pg_err.log",
+    template("$YEAR-$MONTH-$DAY $HOUR:$MIN:$SEC $HOST $MSG\n") template-escape(no)); };
+destination d_external_osrfwarn {               # local0-3 LOG_WARN
+  file("/var/log/evergreen/prod/$YEAR/$MONTH/$DAY/osrfwarn.log",
+    template("$YEAR-$MONTH-$DAY $HOUR:$MIN:$SEC $HOST $MSG\n") template-escape(no)); };
+destination d_external_apache_gw {              # local6
+  file("/var/log/evergreen/prod/$YEAR/$MONTH/$DAY/gateway.$HOUR.log",
+    template("$YEAR-$MONTH-$DAY $HOUR:$MIN:$SEC $HOST $MSG\n") template-escape(no)); };
+destination d_external_apache {                 # local7
+  file("/var/log/evergreen/prod/$YEAR/$MONTH/$DAY/ap_access.log",
+    template("$YEAR-$MONTH-$DAY $HOUR:$MIN:$SEC $HOST $MSG\n") template-escape(no)); };
+destination d_external_apache_err {             # local6 + local7 LOG_ERROR
+  file("/var/log/evergreen/prod/$YEAR/$MONTH/$DAY/ap_error.log",
+    template("$YEAR-$MONTH-$DAY $HOUR:$MIN:$SEC $HOST $MSG\n") template-escape(no)); };
+
+filter f_osrf { facility(local0, local1, local2, local3); };
+filter f_apache { facility(local6, local7); };
+filter f_local0 { facility(local0); };
+filter f_local1 { facility(local1); };
+filter f_local2 { facility(local2); };
+filter f_local3 { facility(local3); };
+filter f_local4 { facility(local4); };
+filter f_local5 { facility(local5); };
+filter f_local6 { facility(local6); };
+filter f_local7 { facility(local7); };
+filter f_error  { level(err..emerg); };
+filter f_warn   { level(warn); };
+filter f_errwarn { level(warn..emerg); };
+
+log { source(s_all); filter(f_local0); destination(d_external_osrfsys); };
+log { source(s_all); filter(f_local1); destination(d_external_osrfact); };
+log { source(s_all); filter(f_local2); destination(d_external_transport); };
+log { source(s_all); filter(f_local3); destination(d_external_postgres); };
+log { source(s_all); filter(f_osrf); filter(f_error); destination(d_external_osrferr); };
+log { source(s_all); filter(f_osrf); filter(f_warn); destination(d_external_osrfwarn); };
+log { source(s_all); filter(f_local3); filter(f_error); destination(d_external_pgerr); };
+
+# apache logs
+log { source(s_all); filter(f_local6); destination(d_external_apache_gw); };
+log { source(s_all); filter(f_local7); destination(d_external_apache); };
+log { source(s_all); filter(f_apache); filter(f_errwarn); destination(d_external_apache_err); };



More information about the open-ils-commits mailing list