[Multiple] Push multiple logs to Redis channel for fail2ban-mailcow to read. Enables Fail2ban independently of used Docker logging driver.
This commit is contained in:
@@ -19,13 +19,20 @@ source s_sogo {
|
||||
destination d_combined {
|
||||
file("/var/log/combined.log");
|
||||
};
|
||||
destination d_redis {
|
||||
destination d_redis_persistent_log {
|
||||
redis(
|
||||
host("redis-mailcow")
|
||||
port(6379)
|
||||
command("LPUSH" "SOGO_LOG" "$(format-json time=\"$S_UNIXTIME\" priority=\"$PRIORITY\" program=\"$PROGRAM\" message=\"$MESSAGE\")\n")
|
||||
);
|
||||
};
|
||||
destination d_redis_f2b_channel {
|
||||
redis(
|
||||
host("redis-mailcow")
|
||||
port(6379)
|
||||
command("PUBLISH" "F2B_CHANNEL" "$MESSAGE")
|
||||
);
|
||||
};
|
||||
log {
|
||||
source(s_sogo);
|
||||
source(s_src);
|
||||
@@ -33,5 +40,6 @@ log {
|
||||
};
|
||||
log {
|
||||
source(s_sogo);
|
||||
destination(d_redis);
|
||||
destination(d_redis_persistent_log);
|
||||
destination(d_redis_f2b_channel);
|
||||
};
|
||||
|
Reference in New Issue
Block a user