syslog-ng.conf 720 B

12345678910111213141516171819202122232425262728293031323334353637
  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 {
  23. redis(
  24. host("redis-mailcow")
  25. port(6379)
  26. command("LPUSH" "SOGO_LOG" "$(format-json time=\"$S_UNIXTIME\" priority=\"$PRIORITY\" program=\"$PROGRAM\" message=\"$MESSAGE\")\n")
  27. );
  28. };
  29. log {
  30. source(s_sogo);
  31. source(s_src);
  32. destination(d_combined);
  33. };
  34. log {
  35. source(s_sogo);
  36. destination(d_redis);
  37. };