Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- input {
- amqp {
- name => 'rawlogs_consumer'
- exchange => 'rawlogs'
- type => 'all'
- host => '192.168.1.5'
- }
- }
- # file: /opt/logstash/server/etc/logstash.conf
- filter {
- grok {
- pattern => '%{HAPROXYHTTP}'
- type => 'haproxy'
- patterns_dir => '/opt/logstash/server/etc/patterns/'
- }
- }
- output {
- stdout { debug => true debug_format => "json" }
- elasticsearch { host => "192.168.1.5" }
- file {
- type => 'haproxy'
- 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}"'
- path => '/opt/logstash/server/vhost_logs/%{request_header_host}.log'
- }
- }
Add Comment
Please, Sign In to add comment