I have to detect failed logins to my XMPP server (Prosody). The log line (with spaces as it is):
Code: Select all
Feb 19 15:02:04 domain.ru:log_auth warn Failed authentication attempt (not-authorized) from IP: 1.2.3.4
Code: Select all
/^(\S+\s+\d+\s+\S+)\s+\S+\s+\S+\s+(Failed authentication attempt)\s+\S+\s+\S+\ IP: (\S*)/
csf.conf custom log as this:
Code: Select all
CUSTOM2_LOG = "/var/log/prosody/prosody.log"
Code: Select all
if (($globlogs{CUSTOM2_LOG}{$lgfile}) and ($line =~ /^(\S+\s+\d+\s+\S+)\s+\S+\s+\S+\s+(Failed authentication attempt)\s+\S+\s+\S+\ IP: (\S*)/)) {
return ("Failed Prosody authentication from",$1,"ProsodyAuth","3","5222","604800");
}
What in the world am I doing wrong this time?