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.

67 lines
2.0 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.29
  7. @include "scl.conf"
  8. options {
  9. chain_hostnames(no); # Enable or disable the chained hostname format.
  10. create_dirs(yes);
  11. keep_hostname(yes); # Enable or disable hostname rewriting.
  12. log_fifo_size(256); # The number of messages that the output queue can store.
  13. log_msg_size(1024); # Maximum length of a message in bytes.
  14. stats_freq(0); # The period between two STATS messages (sent by syslog-ng, containing statistics about dropped logs) in seconds.
  15. flush_lines(0); # How many lines are flushed to a destination at a time.
  16. use_fqdn(no); # Add Fully Qualified Domain Name instead of short hostname.
  17. };
  18. # syslog-ng gets messages from syslog-ng (internal) and from /dev/log
  19. source src {
  20. internal();
  21. unix-dgram("/dev/log");
  22. };
  23. source net {
  24. network_localhost();
  25. };
  26. source s_network {
  27. default-network-drivers(
  28. # NOTE: TLS support
  29. #
  30. # the default-network-drivers() source driver opens the TLS
  31. # enabled ports as well, however without an actual key/cert
  32. # pair they will not operate and syslog-ng would display a
  33. # warning at startup.
  34. #
  35. #tls(key-file("/path/to/ssl-private-key") cert-file("/path/to/ssl-cert"))
  36. );
  37. };
  38. source kernel {
  39. file("/proc/kmsg" program_override("kernel"));
  40. };
  41. destination messages {
  42. file("/var/log/messages");
  43. };
  44. log {
  45. source(src);
  46. source(net);
  47. source(kernel);
  48. destination(messages);
  49. # uncomment this line to open port 514 to receive messages
  50. #source(s_network);
  51. };
  52. #
  53. # Finally, include any user settings last so that s/he can override or
  54. # supplement all "canned" settings inherited from the distribution.
  55. #
  56. @include "/etc/syslog-ng.d/" # Put any customization files in this directory