Thu Nov 16 12:01:01 PST 2006
- Previous message: [Slony1-commit] By cbbrowne: Add a new tool script, search-logs.sh, which may be used to
- Next message: [Slony1-commit] By cbbrowne: Add a regexp exclusion scheme so that error messages that
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Log Message:
-----------
Add an "exclusions" system to the log watcher - you can exclude error
messages that seem irrelevant to you via a regex
Modified Files:
--------------
slony1-engine/tools:
search-logs.sh (r1.1 -> r1.2)
-------------- next part --------------
Index: search-logs.sh
===================================================================
RCS file: /usr/local/cvsroot/slony1/slony1-engine/tools/search-logs.sh,v
retrieving revision 1.1
retrieving revision 1.2
diff -Ltools/search-logs.sh -Ltools/search-logs.sh -u -w -r1.1 -r1.2
--- tools/search-logs.sh
+++ tools/search-logs.sh
@@ -6,14 +6,19 @@
LOGRECIPIENT=${LOGRECIPIENT:-""} # Email recipient - if not set, use STDOUT
LOGTIMESTAMP=${LOGTIMESTAMP:-""} # Override time - format should be "YYYY-MM-DD HH"
+# We found this error message came up often for reasons that will be resolved in 1.2
+# EXCLUSIONS='duplicate key violates unique constraint "sl_nodelock-pkey"'
+EXCLUSIONS="No Exclusions Known"
+
if [[ -z $LOGTIMESTAMP ]] ; then
HRRE=`date -d "1 hour ago" +"%Y-%m-%d %H:[0-9][0-9]:[0-9][0-9] ${TZ}"`
else
HRRE="${LOGTIMESTAMP}:[0-9][0-9]:[0-9][0-9] ${TZ}"
fi
-for log in `find ${LOGHOME} -name "*.log" -mmin -60 | egrep "/node[0-9]+/[^/]+.log"` ; do
- egrep "${HRRE} (ERROR|FATAL)" $log > /tmp/slony-errors.$$
+for log in `find ${LOGHOME} -name "*.log*" -mmin -60 | egrep "/node[0-9]+/[^/]+.log"` ; do
+ egrep "${HRRE} (ERROR|FATAL)" $log | egrep -v "${EXCLUSIONS}" > /tmp/slony-errors.$$
+
if [[ -s /tmp/slony-errors.$$ ]] ; then
echo "
Errors in log ${log}
- Previous message: [Slony1-commit] By cbbrowne: Add a new tool script, search-logs.sh, which may be used to
- Next message: [Slony1-commit] By cbbrowne: Add a regexp exclusion scheme so that error messages that
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Slony1-commit mailing list