You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

62 lines
1.8 KiB

  1. #############################################################################
  2. # OpenWrt syslog-ng.conf specific file
  3. # which collects all local logs into a single file called /var/log/messages.
  4. # More details about these settings can be found here:
  5. # https://www.syslog-ng.com/technical-documents/list/syslog-ng-open-source-edition
  6. @version: 3.24
  7. @include "scl.conf"
  8. @include "/etc/syslog-ng.d/" # Put any customization files in this directory
  9. options {
  10. chain_hostnames(no); # Enable or disable the chained hostname format.
  11. create_dirs(yes);
  12. keep_hostname(yes); # Enable or disable hostname rewriting.
  13. log_fifo_size(256); # The number of messages that the output queue can store.
  14. log_msg_size(1024); # Maximum length of a message in bytes.
  15. stats_freq(0); # The period between two STATS messages (sent by syslog-ng, containing statistics about dropped logs) in seconds.
  16. flush_lines(0); # How many lines are flushed to a destination at a time.
  17. use_fqdn(no); # Add Fully Qualified Domain Name instead of short hostname.
  18. };
  19. # syslog-ng gets messages from syslog-ng (internal) and from /dev/log
  20. source src {
  21. internal();
  22. unix-dgram("/dev/log");
  23. };
  24. source net {
  25. udp(ip(0.0.0.0) port(514));
  26. };
  27. source s_network {
  28. default-network-drivers(
  29. # NOTE: TLS support
  30. #
  31. # the default-network-drivers() source driver opens the TLS
  32. # enabled ports as well, however without an actual key/cert
  33. # pair they will not operate and syslog-ng would display a
  34. # warning at startup.
  35. #
  36. #tls(key-file("/path/to/ssl-private-key") cert-file("/path/to/ssl-cert"))
  37. );
  38. };
  39. source kernel {
  40. file("/proc/kmsg" program_override("kernel"));
  41. };
  42. destination messages {
  43. file("/var/log/messages");
  44. };
  45. log {
  46. source(src);
  47. source(net);
  48. source(kernel);
  49. destination(messages);
  50. # uncomment this line to open port 514 to receive messages
  51. #source(s_network);
  52. };