[Pacemaker] [PATCH 1/2] extra: add rsyslog configuration snippet
Florian Haas
florian at hastexo.com
Thu Jan 5 21:15:41 UTC 2012
---
configure.ac | 4 ++++
extra/Makefile.am | 2 +-
extra/rsyslog/Makefile.am | 5 +++++
extra/rsyslog/pacemaker.conf.in | 39 +++++++++++++++++++++++++++++++++++++++
4 files changed, 49 insertions(+), 1 deletions(-)
create mode 100644 extra/rsyslog/Makefile.am
create mode 100644 extra/rsyslog/pacemaker.conf.in
diff --git a/configure.ac b/configure.ac
index ecae986..ec81938 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1714,6 +1714,10 @@ fencing/Makefile \
extra/Makefile \
extra/resources/Makefile \
extra/rgmanager/Makefile \
+ extra/rsyslog/Makefile \
+ extra/rsyslog/pacemaker.conf \
+ extra/logrotate/Makefile \
+ extra/logrotate/pacemaker.conf \
tools/Makefile \
tools/crm_report \
tools/coverage.sh \
diff --git a/extra/Makefile.am b/extra/Makefile.am
index 5ad7dc7..d9e3360 100644
--- a/extra/Makefile.am
+++ b/extra/Makefile.am
@@ -18,7 +18,7 @@
MAINTAINERCLEANFILES = Makefile.in
-SUBDIRS = resources rgmanager
+SUBDIRS = resources rgmanager rsyslog
mibdir = $(datadir)/snmp/mibs
mib_DATA = PCMK-MIB.txt
diff --git a/extra/rsyslog/Makefile.am b/extra/rsyslog/Makefile.am
new file mode 100644
index 0000000..dbde43c
--- /dev/null
+++ b/extra/rsyslog/Makefile.am
@@ -0,0 +1,5 @@
+MAINTAINERCLEANFILES = Makefile.in
+
+rsyslogdir = $(sysconfdir)/rsyslog.d
+
+rsyslog_DATA = pacemaker.conf
diff --git a/extra/rsyslog/pacemaker.conf.in b/extra/rsyslog/pacemaker.conf.in
new file mode 100644
index 0000000..4c52698
--- /dev/null
+++ b/extra/rsyslog/pacemaker.conf.in
@@ -0,0 +1,39 @@
+# rsyslog configuration snippet for Pacemaker daemons
+#
+# Include this file in your rsyslog configuration file,
+# _before_ your default log processing rules.
+#
+# If you want Pacemaker log entries in individual log
+# files _and_ your catch-all syslog file, remove the
+# "&v~" lines.
+
+$template PacemakerDaemonLog,"@localstatedir@/log/@PACKAGE_TARNAME@/%programname%.log"
+
+# Entries from the crm_attribute binary and attrd go
+# to one log file.
+:programname,isequal,"crm_attribute" @localstatedir@/log/@PACKAGE_TARNAME@/attrd.log
+& ~
+:programname,isequal,"attrd" ?PacemakerDaemonLog
+& ~
+
+# CIB status messages
+:programname,isequal,"cib" ?PacemakerDaemonLog
+& ~
+
+# Messages from crmd
+:programname,isequal,"crmd" ?PacemakerDaemonLog
+& ~
+
+# Messages from lrmd, including stdout and stderr
+# from poorly-written resource agents that don't
+# use ocf_log and/or ocf_run
+:programname,isequal,"lrmd" ?PacemakerDaemonLog
+& ~
+
+# Policy Engine messages
+:programname,isequal,"pengine" ?PacemakerDaemonLog
+& ~
+
+# Messages from the fencing daemons
+:programname,startswith,"stonith" ?PacemakerDaemonLog
+& ~
--
1.7.5.4
More information about the Pacemaker
mailing list