Advertisement
Guest User

Untitled

a guest
Aug 18th, 2020
122
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.73 KB | None | 0 0
  1. ## SPLUNK
  2. #*** Configure local destinations for syslog here. ***
  3. #
  4. ## SPLUNK
  5. #
  6. #
  7. destination d_wlc { file("/var/log/syslog-ng/splunk/wlc/$FACILITY"); };
  8. destination d_NetworkGear { file("/var/log/syslog-ng/splunk/Network_Gear/$FACILITY"); };
  9. destination d_bitbucket { file("/var/log/syslog-ng/splunk/bit_bucket/$FACILITY"); };
  10.  
  11. #*** Configure filter for the network device IP address here. ***
  12. #
  13. # NOTE: Make sure there is a space after the ) following the IP address #
  14. #
  15. #
  16. filter f_wlc { netmask(172.16.91.0/24)
  17. or netmask(10.26.141.18/32)
  18. or netmask(10.255.22.18/32)
  19. or netmask(172.16.91.0/24)
  20. or netmask(172.16.92.0/22); };
  21.  
  22. filter f_NetworkGear { netmask(10.255.0.0/16)
  23. or netmask(10.40.0.0/16)
  24. or netmask(172.16.252.0/16)
  25. or netmask(172.26.252.0/16)
  26. or netmask(172.26.253.0/16)
  27. or netmask(172.26.254.0/16)
  28. or netmask(172.26.255.0/16); };
  29.  
  30. filter f_bitbucket { netmask(129.255.0.0/16)
  31. or netmask(10.0.0.0/8)
  32. or netmask(192.168.0.0/16)
  33. or netmask(172.16.0.0/12); };
  34.  
  35. #
  36. # Combine log destination and filter
  37. #
  38. #
  39. log { source(s_syslog-ng); filter(f_wlc); destination(d_wlc); };
  40. log { source(s_syslog-ng); filter(f_NetworkGear); destination(d_NetworkGear); };
  41. log { source(s_syslog-ng); filter(f_bitbucket); destination(d_bitbucket); };
  42.  
  43.  
  44. #
  45. # END SPLUNK
  46. #*** Section ends. ***
  47. # vim:ft=syslog-ng:ai:si:ts=4:sw=4:etc
  48.  
  49. =============================
  50.  
  51. So the theory is that everything that doesnt get caugh by the first two filters, gets caught by the "bitbucket"
  52. But what is happening is that it seems logs are being filtered into BOTH filter f_NetworkGear and filter f_bitbucket.
  53.  
  54. Is there a way to have syslog not put it in both ? The filter f_bitbucket is intended to be a catch all that is for anything not filtered above.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement