Last change
on this file since 14444 was 13063, checked in by Daniela Dorner, 13 years ago |
added (script to check global logfile for errors and warnings)
|
-
Property svn:executable
set to
*
|
File size:
697 bytes
|
Line | |
---|
1 | #!/bin/bash
|
---|
2 | #
|
---|
3 | # This script checks, if there are WARNs or ERRORs in the processlog of
|
---|
4 | # the last night and sends them to the emailadresse(s) in $erradr
|
---|
5 | #
|
---|
6 |
|
---|
7 | source `dirname $0`/../Sourcefile.sh
|
---|
8 | printprocesslog "INFO starting $0"
|
---|
9 |
|
---|
10 | oldprocesslog=$processlogpath/process`date +%F --date="-1day"`.log
|
---|
11 |
|
---|
12 | if grep WARN $oldprocesslog >/dev/null
|
---|
13 | then
|
---|
14 | grep WARN $oldprocesslog | mail -s 'found warnings in '$oldprocesslog $erradrs
|
---|
15 | printprocesslog "INFO sent warnings to "$erradrs
|
---|
16 | fi
|
---|
17 |
|
---|
18 | if grep ERROR $oldprocesslog >/dev/null
|
---|
19 | then
|
---|
20 | grep ERROR $oldprocesslog | mail -s 'found errors in '$oldprocesslog $erradrs
|
---|
21 | printprocesslog "INFO sent errors to "$erradrs
|
---|
22 | fi
|
---|
23 |
|
---|
24 | printprocesslog "INFO finished $0"
|
---|
25 |
|
---|
Note:
See
TracBrowser
for help on using the repository browser.