Advertisement
Guest User

Untitled

a guest
May 26th, 2015
307
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.55 KB | None | 0 0
  1. # Content of the file /etc/logstash/conf.d/auditd.conf
  2. # Tested on the CentOS 7 auditspd logs forwarded to logstash via rsyslog
  3.  
  4. input {
  5. syslog {
  6. type => AUDITD
  7. port => xxxx
  8. host => "xxx.xxx.xxx.xxx"
  9. }
  10. }
  11.  
  12. filter {
  13. if [type] == "AUDITD" {
  14. if [program] == "audispd" {
  15. grok {
  16. match => [ "message", "%{AUDITDTRIAL}%{GREEDYDATA:msg}" ]
  17. }
  18. grok {
  19. match => [
  20. "msg", "%{AUDITD_1}",
  21. "msg", "%{AUDITD_2}",
  22. "msg", "%{AUDITD_3}",
  23. "msg", "%{AUDITD_4}",
  24. "msg", "%{AUDITD_5}",
  25. "msg", "%{AUDITD_6}",
  26. "msg", "%{AUDITD_7}",
  27. "msg", "%{AUDITD_8}",
  28. "msg", "%{AUDITD_9}",
  29. "msg", "%{AUDITD_10}",
  30. "msg", "%{AUDITD_11}",
  31. "msg", "%{AUDITD_12}",
  32. "msg", "%{AUDITD_13}",
  33. "msg", "%{AUDITD_14}",
  34. "msg", "%{AUDITD_15}",
  35. "msg", "%{AUDITD_16}",
  36. "msg", "%{AUDITD_17}",
  37. "msg", "%{AUDITD_18}",
  38. "msg", "%{AUDITD_19}",
  39. "msg", "%{AUDITD_20}",
  40. "msg", "%{AUDITD_21}",
  41. "msg", "%{AUDITD_22}",
  42. "msg", "%{AUDITD_23}",
  43. "msg", "%{AUDITD_24}",
  44. "msg", "%{AUDITD_25}",
  45. "msg", "%{AUDITD_26}"
  46. ]
  47. }
  48. mutate {
  49. remove_field => [ "msg" ]
  50. }
  51. }
  52. }
  53. }
  54.  
  55. output {
  56. if [type] == "AUDITD" {
  57. elasticsearch {
  58. flush_size => 2000
  59. protocol => "transport"
  60. cluster => "xxxxxxxx"
  61. host => "xxx.xxx.xxx.xxx"
  62. index => "logstash-syslog-%{+YYYY.MM.dd}"
  63. }
  64. }
  65. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement