syslog-ng.conf 980 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. @version: 3.5
  2. @include "scl.conf"
  3. options {
  4. chain_hostnames(off);
  5. flush_lines(0);
  6. use_dns(no);
  7. use_fqdn(no);
  8. owner("root"); group("adm"); perm(0640);
  9. stats_freq(0);
  10. bad_hostname("^gconfd$");
  11. };
  12. source s_src {
  13. unix-stream("/dev/log");
  14. internal();
  15. };
  16. source s_sogo {
  17. file("/var/log/sogo/sogo.log");
  18. };
  19. destination d_combined {
  20. file("/var/log/combined.log");
  21. };
  22. destination d_redis_persistent_log {
  23. redis(
  24. host("redis-mailcow")
  25. persist-name("redis1")
  26. port(6379)
  27. command("LPUSH" "SOGO_LOG" "$(format-json time=\"$S_UNIXTIME\" priority=\"$PRIORITY\" program=\"$PROGRAM\" message=\"$MESSAGE\")\n")
  28. );
  29. };
  30. destination d_redis_f2b_channel {
  31. redis(
  32. host("redis-mailcow")
  33. persist-name("redis2")
  34. port(6379)
  35. command("PUBLISH" "F2B_CHANNEL" "$MESSAGE")
  36. );
  37. };
  38. log {
  39. source(s_sogo);
  40. source(s_src);
  41. destination(d_combined);
  42. };
  43. log {
  44. source(s_sogo);
  45. destination(d_redis_persistent_log);
  46. destination(d_redis_f2b_channel);
  47. };