Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 11 additions & 5 deletions mig/install/migerrors-template.sh.cronjob
Original file line number Diff line number Diff line change
Expand Up @@ -25,17 +25,23 @@ TODAY=$(date +'%Y-%m-%d')
YESTERDAY=$(date --date=yesterday +%'Y-%m-%d')
# Number of lines to allow from each log
MAXLINES=1000
# Which services are enabled ?
ENABLE_FTPS="__ENABLE_FTPS__"
ENABLE_SFTP="__ENABLE_SFTP__"
ENABLE_SFTP_SUBSYS="__ENABLE_SFTP_SUBSYS__"
ENABLE_DAVS="__ENABLE_DAVS__"
{
grep -H "Internal Server Error" $LOGDIR/webdavs.out | tail -n $MAXLINES
grep -H -A 12 "Traceback" $LOGDIR/webdavs.out | tail -n $MAXLINES
[ "$ENABLE_DAVS" == "True" ] && grep -H "Internal Server Error" $LOGDIR/webdavs.out | tail -n $MAXLINES
[ "$ENABLE_DAVS" == "True" ] && grep -H -A 12 "Traceback" $LOGDIR/webdavs.out | tail -n $MAXLINES

grep -H " ERROR " $LOGDIR/ftps.log | \
[ "$ENABLE_FTPS" == "True" ] && grep -H " ERROR " $LOGDIR/ftps.log | \
grep -E -v "ERROR (Invalid user(name)?|auth failed) .* from ${SECSCANIP}|${SECSCANIP}, .* Invalid user(name)?|GDP: Project logout failed for user: .* from ip: ${SECSCANIP} with|Invalid username [a-zA-Z0-9._-]* from|ERROR Account disabled or expired|: Invalid path characters" | tail -n $MAXLINES

grep -H " ERROR " $LOGDIR/sftp*.log | \
[[ "$ENABLE_SFTP" == "True" || "$ENABLE_SFTP_SUBSYS" == True ]] \
&& grep -H " ERROR " $LOGDIR/sftp*.log | \
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)?|auth failed) .* from ${SECSCANIP}|${SECSCANIP}, .* Invalid user(name)?|GDP: Project logout failed for user: .* from ip: ${SECSCANIP} with|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 .*|get_fs_path failed: Invalid path characters|ERROR $" | tail -n $MAXLINES

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)?|auth failed) .* from ${SECSCANIP}|${SECSCANIP}, .* Invalid user(name)?|GDP: Project logout failed for user: .* from ip: ${SECSCANIP} with|Invalid username [a-zA-Z0-9._-]* from|ERROR Account disabled or expired|invalid share mode (write|read)-only for |: Invalid path characters" | tail -n $MAXLINES
[ "$ENABLE_DAVS" == "True" ] && 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)?|auth failed) .* from ${SECSCANIP}|${SECSCANIP}, .* Invalid user(name)?|GDP: Project logout failed for user: .* from ip: ${SECSCANIP} with|Invalid username [a-zA-Z0-9._-]* from|ERROR Account disabled or expired|invalid share mode (write|read)-only for |: Invalid path characters" | tail -n $MAXLINES

grep -H " ERROR " $LOGDIR/chkchroot.log | grep -E -v " from ${SECSCANIP} "| \
grep -E -v "__CRACK_WEB_REGEX__" | \
Expand Down
Loading