Advertisement
Guest User

Untitled

a guest
Feb 21st, 2020
153
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.26 KB | None | 0 0
  1. GNU nano 3.2 /etc/logstash/conf.d/suricata.conf
  2.  
  3. input {
  4. beats {
  5. port => 5044
  6. codec => "json_lines"
  7. #codec => json
  8. }
  9. }
  10.  
  11. filter {
  12. if [application] == "suricata" {
  13. date {
  14. match => [ "timestamp", "ISO8601" ]
  15. }
  16. ruby {
  17. code => "if event['event_type'] == 'fileinfo'; event['fileinfo']['type']=event['fileinfo']['magic'].to_s.split(',')[0]; end;"
  18. }
  19. }
  20.  
  21. if [src_ip] {
  22. geoip {
  23. source => "src_ip"
  24. target => "geoip"
  25. add_field => [ "[geoip][coordinates]", "%{[geoip][longitude]}" ]
  26. add_field => [ "[geoip][coordinates]", "%{[geoip][latitude]}" ]
  27. }
  28. mutate {
  29. convert => [ "[geoip][coordinates]", "float" ]
  30. }
  31. if ![geoip.ip] {
  32. if [dest_ip] {
  33. geoip {
  34. source => "dest_ip"
  35. target => "geoip"
  36. add_field => [ "[geoip][coordinates]", "%{[geoip][longitude]}" ]
  37. add_field => [ "[geoip][coordinates]", "%{[geoip][latitude]}" ]
  38. }
  39. mutate {
  40. convert => [ "[geoip][coordinates]", "float" ]
  41. }
  42. }
  43. }
  44. }
  45. }
  46.  
  47. output {
  48. elasticsearch { hosts => ["localhost:9200"] }
  49. #stdout { codec => rubydebug }
  50. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement