LogWatch: free pattern based log analyzer

Patterns for Samba

Patterns for Communigate

/etc/cron.d/cgpro-log:

*/5 * * * * root /etc/localsite/syslog/cgpro

/etc/localsite/syslog/cgpro:

#!/bin/sh
log=`ls -1 /var/CommuniGate/SystemLogs/20*.log 2>/dev/null | tail -1`
[ -n "$log" ] || exit 0
prefix=${log/*\//};
prefix=${prefix%.log};
awk '{print "'"$prefix"'",$0}' $log > /var/log/cgpro.log
exit 0

 

Attachments

Comments

Post new comment

The content of this field is kept private and will not be shown publicly.
To prevent automated spam submissions leave this field empty.