Advertisement
Guest User

Untitled

a guest
May 23rd, 2018
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.86 KB | None | 0 0
  1. input {
  2. beats {
  3. port => "5050"
  4. }
  5. beats {
  6. port => "5051"
  7. }
  8. }
  9.  
  10. filter {
  11. grok {
  12. match => {
  13. "message" => '%{IPORHOST:clientip} %{USER:ident} %{USER:auth} \[%{HTTPDATE:timestamp}\] "(?:%{WORD:verb} %{NOTSPACE:request}(?: HTTP/%{NUMBER:httpversion})?|%{DATA:rawrequest})" %{NUMBER:response} (?:%{NUMBER:bytes}|-) %{QS:referrer} %{QS:agent}'
  14. }
  15. }
  16.  
  17. date {
  18. match => ["timestamp", "dd/MMM/yyyy:HH:mm:ss Z"]
  19. target => "@timestamp"
  20. locale => en
  21. }
  22.  
  23. geoip {
  24. source => "clientip"
  25. }
  26.  
  27. useragent {
  28. source => "agent"
  29. target => "useragent"
  30. }
  31. }
  32.  
  33. output {
  34. stdout {
  35. codec => dots
  36. }
  37. elasticsearch {
  38. hosts => ["10.0.2.4:9200"]
  39. index => "apache_example"
  40. template => "/home/ubuntu/Documents/apache_example/apache_template.json"
  41. template_name => "apache_template"
  42. template_overwrite => true
  43. }
  44. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement