Skip to content

Commit 0ebfa26

Browse files
committed
tighten migerrors cronjob to explicitly look for the ' ERROR ' log marker to reduce noise e.g. from file names which happen to contain 'ERROR' in them
git-svn-id: svn+ssh://svn.code.sf.net/p/migrid/code/trunk@6184 b75ad72c-e7d7-11dd-a971-7dbc132099af
1 parent 56a3e46 commit 0ebfa26

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

mig/install/migerrors-template.sh.cronjob

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,21 +29,21 @@ MAXLINES=1000
2929
grep -H "Internal Server Error" $LOGDIR/webdavs.out | tail -n $MAXLINES
3030
grep -H -A 12 "Traceback" $LOGDIR/webdavs.out | tail -n $MAXLINES
3131
32-
grep -H ERROR $LOGDIR/ftps.log | \
32+
grep -H " ERROR " $LOGDIR/ftps.log | \
3333
grep -E -v "ERROR Invalid user(name)? .* from ${SECSCANIP}|Invalid username [a-zA-Z0-9._-]* from|ERROR Account disabled or expired" | tail -n $MAXLINES
3434
35-
grep -H ERROR $LOGDIR/sftp*.log | \
35+
grep -H " ERROR " $LOGDIR/sftp*.log | \
3636
grep -E -v "Password authentication failed for|Socket exception: Connection reset by peer|Error reading SSH protocol banner|check_banner|list_folder on missing path|chmod (292|365) rejected on path|symlink rejected on path|ERROR mkdir .* failed: \[Errno 17\] File exists|ERROR rmdir .* failed: \[Errno 39\] Directory not empty|ERROR open .* failed: \[Errno 21\] Is a directory|ERROR open for modify on read-only path|ERROR open existing file on missing path |ERROR Exception.*: Incompatible ssh|ERROR Exception.*: Incompatible version |Exception.*: Invalid SSH banner|ERROR Exception.*: no moduli available|ERROR Exception.*: Expecting packet from \(20,\), got 0|ERROR Socket exception: Connection timed out|ERROR Exception.*: Key-exchange timed out|ERROR Invalid user(name)? .* from ${SECSCANIP}|Invalid username [a-zA-Z0-9._-]* from|ERROR Account disabled or expired|ERROR Exception.*: Client kex .* is out of range|ERROR Exception.*: Expecting packet from .*|ERROR $" | tail -n $MAXLINES
3737
38-
grep -H ERROR $LOGDIR/davs.log | grep -E -v "The handshake operation timed out|decryption failed or bad record mac|length too short|no ciphers specified|(unknown error|parse tlsext|https proxy request) \(_ssl.c:\)|SSL/TLS wrap of .* failed unexpectedly:|Failed password login for .* from ${SECSCANIP}|ERROR Invalid user(name)? .* from ${SECSCANIP}|Invalid username [a-zA-Z0-9._-]* from|ERROR Account disabled or expired|invalid share mode (write|read)-only for " | tail -n $MAXLINES
38+
grep -H " ERROR " $LOGDIR/davs.log | grep -E -v "The handshake operation timed out|decryption failed or bad record mac|length too short|no ciphers specified|(unknown error|parse tlsext|https proxy request) \(_ssl.c:\)|SSL/TLS wrap of .* failed unexpectedly:|Failed password login for .* from ${SECSCANIP}|ERROR Invalid user(name)? .* from ${SECSCANIP}|Invalid username [a-zA-Z0-9._-]* from|ERROR Account disabled or expired|invalid share mode (write|read)-only for " | tail -n $MAXLINES
3939
40-
grep -H ERROR $LOGDIR/chkchroot.log | grep -E -v " from ${SECSCANIP} "| \
40+
grep -H " ERROR " $LOGDIR/chkchroot.log | grep -E -v " from ${SECSCANIP} "| \
4141
grep -E -v "__CRACK_WEB_REGEX__" | \
4242
grep -E -v "/index\.html$|/state/webserver_home/share_redirect$" | \
4343
tail -n $MAXLINES
4444
4545
# NOTE: we ignore script crashed errors here and treat specifically next
46-
grep -H ERROR $LOGDIR/mig.log | \
46+
grep -H " ERROR " $LOGDIR/mig.log | \
4747
grep -E -v "problems importing arclib|disabled in configuration|(settings|userprofile) could not be opened/unpickled|load (ssh|ftps|davs|seafile) publickeys failed|is not a valid openid provider|script crashed:|INFO Content-Length missing or zero|${SECSCANIP} (refused to|could not) import .*shared\.functionality\.|INFO Not available on this site.*Replied .ERROR.|: failed on .*: .*\[Errno 2\] No such file or directory: |: failed on .*: .*\[Errno 17\] File exists: |create directory failed: .*\[Errno 17\] File exists:|refusing rm link: .*/user_home/.*/Trash" | tail -n $MAXLINES
4848
# Extract variable length script crash tracebacks terminated with a blank line
4949
sed -n "/ERROR.* script crashed:/""{ :a; $p; N; /\n$/!ba; p; }" $LOGDIR/mig.log | tail -n $MAXLINES

0 commit comments

Comments
 (0)