Guest User

Untitled

a guest
Nov 20th, 2018
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.98 KB | None | 0 0
  1. input {
  2.  
  3. amqp {
  4. name => 'rawlogs_consumer'
  5. exchange => 'rawlogs'
  6. type => 'all'
  7. host => '192.168.1.5'
  8. }
  9. }
  10.  
  11. # file: /opt/logstash/server/etc/logstash.conf
  12.  
  13. filter {
  14. grok {
  15. pattern => '%{HAPROXYHTTP}'
  16. type => 'haproxy'
  17. patterns_dir => '/opt/logstash/server/etc/patterns/'
  18. }
  19. }
  20.  
  21.  
  22. output {
  23. stdout { debug => true debug_format => "json" }
  24. elasticsearch { host => "192.168.1.5" }
  25.  
  26. file {
  27. type => 'haproxy'
  28. message_format => '%{client_ip} - - [%{haproxy_monthday}/%{haproxy_month}/%{haproxy_year}:%{haproxy_time} +0000] "%{http_verb} %{http_request}" %{http_status_code} %{bytes_read} "%{request_header_referer}" "%{request_header_user_agent}"'
  29. path => '/opt/logstash/server/vhost_logs/%{request_header_host}.log'
  30. }
  31.  
  32. }
Add Comment
Please, Sign In to add comment