Advertisement
Guest User

Untitled

a guest
Oct 2nd, 2019
140
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.90 KB | None | 0 0
  1. @version:3.5
  2. @include "scl.conf"
  3.  
  4. # syslog-ng configuration file.
  5. #
  6. # This should behave pretty much like the original syslog on RedHat. But
  7. # it could be configured a lot smarter.
  8. #
  9. # See syslog-ng(8) and syslog-ng.conf(5) for more information.
  10. #
  11. # Note: it also sources additional configuration files (*.conf)
  12. # located in /etc/syslog-ng/conf.d/
  13.  
  14. options {
  15. chain_hostnames(off);
  16. flush_lines(0);
  17. use_dns(no);
  18. use_fqdn(no);
  19. owner("root");
  20. group("adm");
  21. perm(0640);
  22. stats_freq(0);
  23. bad_hostname("^gconfd$");
  24. };
  25.  
  26. source s_sys {
  27. system();
  28. internal();
  29. };
  30.  
  31. source s_net {
  32. tcp(port(514) flags(syslog-protocol));
  33. udp(port(514) flags(syslog-protocol));
  34. };
  35.  
  36. ########################
  37. # Destinations
  38. ########################
  39. destination d_librenms {
  40. program("/opt/librenms/syslog.php" template ("$HOST||$FACILITY||$PRIORITY||$LEVEL||$TAG||$R_YEAR-$R_MONTH-$R_DAY $R_HOUR:$R_MIN:$R_SEC||$MSG||$PROGRAM\n") template-escape(yes));
  41. };
  42.  
  43. filter f_kernel { facility(kern); };
  44. filter f_default { level(info..emerg) and
  45. not (facility(mail)
  46. or facility(authpriv)
  47. or facility(cron)); };
  48. filter f_auth { facility(authpriv); };
  49. filter f_mail { facility(mail); };
  50. filter f_emergency { level(emerg); };
  51. filter f_news { facility(uucp) or
  52. (facility(news)
  53. and level(crit..emerg)); };
  54. filter f_boot { facility(local7); };
  55. filter f_cron { facility(cron); };
  56.  
  57. ########################
  58. # Log paths
  59. ########################
  60. log {
  61. source(s_net);
  62. source(s_sys);
  63. destination(d_librenms);
  64. };
  65.  
  66. # Source additional configuration files (.conf extension only)
  67. @include "/etc/syslog-ng/conf.d/*.conf"
  68.  
  69.  
  70. # vim:ft=syslog-ng:ai:si:ts=4:sw=4:et:
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement