beat_kafka.conf 564 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. input {
  2. beats {
  3. port => 5044
  4. }
  5. udp {
  6. port => 10514
  7. type => "syslog"
  8. }
  9. lumberjack {
  10. port => 5043
  11. ssl_key => "/ssl/selfsigned.key"
  12. ssl_certificate => "/ssl/selfsigned.crt"
  13. }
  14. }
  15. filter {
  16. if [type] == "syslog" {
  17. mutate {
  18. gsub => [ "message", "\t", "\\t" ]
  19. }
  20. if ![programname] {
  21. json {
  22. source => "message"
  23. }
  24. }
  25. mutate {
  26. replace => [ "type", "%{programname}" ]
  27. }
  28. }
  29. }
  30. output {
  31. kafka {
  32. codec => json
  33. bootstrap_servers => "kafka:9092"
  34. topic_id => "%{type}"
  35. }
  36. stdout {
  37. codec => rubydebug
  38. }
  39. }