[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:
andryyy
2017-07-04 18:08:20 +02:00
parent ed11e7586e
commit dc463c3dda
6 changed files with 71 additions and 63 deletions

View File

@@ -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);
};