Skip to content

Instantly share code, notes, and snippets.

@hagait
Created February 5, 2015 11:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hagait/23f4b2bc614a4c4acbb6 to your computer and use it in GitHub Desktop.
Save hagait/23f4b2bc614a4c4acbb6 to your computer and use it in GitHub Desktop.
input {
file {
path => "/var/log/httpd/logstash-acc.log"
codec => json
type => "tracking"
discover_interval => 1
}
}
#filter {
# grok {
# match => [ "message", "%{TIMESTAMP_ISO8601:timestamp} %{IP:client_ip} %{NUMBER:client_port:int} %{NUMBER:latency_ms:float} %{NUMBER:latency_sec:float} %{NUMBER:elb_status_code:int} %{QS:request} %{QS:referer} %{QS:user_agent}" ]
# }
#}
filter {
geoip {
add_tag => [ "geoip" ]
source => "client_ip"
database => "/gluster/videomobile/tracking/logstash-resources/GeoIP.dat"
}
}
filter {
kv {
source => "request"
field_split => "&?"
}
}
output {
file {
path => "/media/ephemeral0/logstash_logs/bq.log"
codec => "plain"
message_format => "%{bq_timestamp},%{client_ip},%{elb_status_code},%{referer},%{e},%{w},%{vid},%{vname},%{ecpm},%{adid},%{media_file_type},%{media_file_url},%{current_url},%{apid},%{d},%{device},%{csize},%{token}"
}
elasticsearch {
host => "video.hostname.com"
flush_size => 2200
workers => 2
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment