#!/bin/bash # $Id$ # # Parses log files for stacktraces and reports them with additional information. # EXTRACTOR=/usr/share/aranea-monitoring/stacktrace-extractor.awk MAIL=root for dir in `ls -d /var/log/aranea/*`; do NODELOG=$dir/node.log; ARANEALOG=$dir/aranea.log; NODENAME=`basename $dir`; if [ -e $NODELOG ]; then cd $dir; logtail2 $NODELOG | awk -f $EXTRACTOR -v node_name=$NODENAME | mail -e -s "Stacktrace on $HOSTNAME - $NODENAME" $MAIL fi done exit 0