Skip to content

Instantly share code, notes, and snippets.

@jeffmess
Created June 8, 2016 09:23
Show Gist options
  • Save jeffmess/9d277424e3e6d7c988c287b03366cde4 to your computer and use it in GitHub Desktop.
Save jeffmess/9d277424e3e6d7c988c287b03366cde4 to your computer and use it in GitHub Desktop.
I, [2016-06-08T09:21:32.627029 #1] INFO -- : {"method":"GET","path":"/documentation/1.0/requests/show.html","format":"html","controller":"apipie/apipies","action":"index","status":200,"duration":1077.15,"view":362.97,"db":0.0,"@timestamp":"2016-06-08T09:21:32.619Z","@version":"1","message":"[200] GET /documentation/1.0/requests/show.html (apipie/apipies#index)"}
{:timestamp=>"2016-06-08T09:21:34.409000+0000", :message=>"Failed action. ", :status=>400, :action=>["index", {:_id=>nil, :_index=>"logstash-2016.06.08", :_type=>"ruby-logger", :_routing=>nil}, #<LogStash::Event:0x5ed15a8 @metadata_accessors=#<LogStash::Util::Accessors:0x1bce8297 @store={"path"=>"/logs/development.log", "retry_count"=>0}, @lut={"[path]"=>[{"path"=>"/logs/development.log", "retry_count"=>0}, "path"]}>, @cancelled=false, @data={"message"=>["I, [2016-06-08T09:21:32.627029 #1] INFO -- : {\"method\":\"GET\",\"path\":\"/documentation/1.0/requests/show.html\",\"format\":\"html\",\"controller\":\"apipie/apipies\",\"action\":\"index\",\"status\":200,\"duration\":1077.15,\"view\":362.97,\"db\":0.0,\"@timestamp\":\"2016-06-08T09:21:32.619Z\",\"@version\":\"1\",\"message\":\"[200] GET /documentation/1.0/requests/show.html (apipie/apipies#index)\"}", "{\"method\":\"GET\",\"path\":\"/documentation/1.0/requests/show.html\",\"format\":\"html\",\"controller\":\"apipie/apipies\",\"action\":\"index\",\"status\":200,\"duration\":1077.15,\"view\":362.97,\"db\":0.0,\"@timestamp\":\"2016-06-08T09:21:32.619Z\",\"@version\":\"1\",\"message\":\"[200] GET /documentation/1.0/requests/show.html (apipie/apipies#index)\"}"], "@version"=>"1", "@timestamp"=>"2016-06-08T09:21:32.943Z", "host"=>"5e9879d9bb52", "path"=>"/logs/development.log", "type"=>"ruby-logger", "timestamp"=>["I, [2016-06-08T09:21:32.627029 #1] INFO -- : {\"method\":\"GET\",\"path\":\"/documentation/1.0/requests/show.html\",\"format\":\"html\",\"controller\":\"apipie/apipies\",\"action\":\"index\",\"status\":200,\"duration\":1077.15,\"view\":362.97,\"db\":0.0,\"@timestamp\":\"2016-06-08T09:21:32.619Z\",\"@version\":\"1\",\"message\":\"[200] GET /documentation/1.0/requests/show.html (apipie/apipies#index)\"}", "2016-06-08T09:21:32.627029"], "pid"=>"1", "loglevel"=>"INFO"}, @metadata={"path"=>"/logs/development.log", "retry_count"=>0}, @accessors=#<LogStash::Util::Accessors:0x3b07482f @store={"message"=>["I, [2016-06-08T09:21:32.627029 #1] INFO -- : {\"method\":\"GET\",\"path\":\"/documentation/1.0/requests/show.html\",\"format\":\"html\",\"controller\":\"apipie/apipies\",\"action\":\"index\",\"status\":200,\"duration\":1077.15,\"view\":362.97,\"db\":0.0,\"@timestamp\":\"2016-06-08T09:21:32.619Z\",\"@version\":\"1\",\"message\":\"[200] GET /documentation/1.0/requests/show.html (apipie/apipies#index)\"}", "{\"method\":\"GET\",\"path\":\"/documentation/1.0/requests/show.html\",\"format\":\"html\",\"controller\":\"apipie/apipies\",\"action\":\"index\",\"status\":200,\"duration\":1077.15,\"view\":362.97,\"db\":0.0,\"@timestamp\":\"2016-06-08T09:21:32.619Z\",\"@version\":\"1\",\"message\":\"[200] GET /documentation/1.0/requests/show.html (apipie/apipies#index)\"}"], "@version"=>"1", "@timestamp"=>"2016-06-08T09:21:32.943Z", "host"=>"5e9879d9bb52", "path"=>"/logs/development.log", "type"=>"ruby-logger", "timestamp"=>["I, [2016-06-08T09:21:32.627029 #1] INFO -- : {\"method\":\"GET\",\"path\":\"/documentation/1.0/requests/show.html\",\"format\":\"html\",\"controller\":\"apipie/apipies\",\"action\":\"index\",\"status\":200,\"duration\":1077.15,\"view\":362.97,\"db\":0.0,\"@timestamp\":\"2016-06-08T09:21:32.619Z\",\"@version\":\"1\",\"message\":\"[200] GET /documentation/1.0/requests/show.html (apipie/apipies#index)\"}", "2016-06-08T09:21:32.627029"], "pid"=>"1", "loglevel"=>"INFO"}, @lut={"host"=>[{"message"=>["I, [2016-06-08T09:21:32.627029 #1] INFO -- : {\"method\":\"GET\",\"path\":\"/documentation/1.0/requests/show.html\",\"format\":\"html\",\"controller\":\"apipie/apipies\",\"action\":\"index\",\"status\":200,\"duration\":1077.15,\"view\":362.97,\"db\":0.0,\"@timestamp\":\"2016-06-08T09:21:32.619Z\",\"@version\":\"1\",\"message\":\"[200] GET /documentation/1.0/requests/show.html (apipie/apipies#index)\"}", "{\"method\":\"GET\",\"path\":\"/documentation/1.0/requests/show.html\",\"format\":\"html\",\"controller\":\"apipie/apipies\",\"action\":\"index\",\"status\":200,\"duration\":1077.15,\"view\":362.97,\"db\":0.0,\"@timestamp\":\"2016-06-08T09:21:32.619Z\",\"@version\":\"1\",\"message\":\"[200] GET /documentation/1.0/requests/show.html (apipie/apipies#index)\"}"], "@version"=>"1", "@timestamp"=>"2016-06-08T09:21:32.943Z", "host"=>"5e9879d9bb52", "path"=>"/logs/development.log", "type"=>"ruby-logger", "timestamp"=>["I, [2016-06-08T09:21:32.627029 #1] INFO -- : {\"method\":\"GET\",\"path\":\"/documentation/1.0/requests/show.html\",\"format\":\"html\",\"controller\":\"apipie/apipies\",\"action\":\"index\",\"status\":200,\"duration\":1077.15,\"view\":362.97,\"db\":0.0,\"@timestamp\":\"2016-06-08T09:21:32.619Z\",\"@version\":\"1\",\"message\":\"[200] GET /documentation/1.0/requests/show.html (apipie/apipies#index)\"}", "2016-06-08T09:21:32.627029"], "pid"=>"1", "loglevel"=>"INFO"}, "host"], "path"=>[{"message"=>["I, [2016-06-08T09:21:32.627029 #1] INFO -- : {\"method\":\"GET\",\"path\":\"/documentation/1.0/requests/show.html\",\"format\":\"html\",\"controller\":\"apipie/apipies\",\"action\":\"index\",\"status\":200,\"duration\":1077.15,\"view\":362.97,\"db\":0.0,\"@timestamp\":\"2016-06-08T09:21:32.619Z\",\"@version\":\"1\",\"message\":\"[200] GET /documentation/1.0/requests/show.html (apipie/apipies#index)\"}", "{\"method\":\"GET\",\"path\":\"/documentation/1.0/requests/show.html\",\"format\":\"html\",\"controller\":\"apipie/apipies\",\"action\":\"index\",\"status\":200,\"duration\":1077.15,\"view\":362.97,\"db\":0.0,\"@timestamp\":\"2016-06-08T09:21:32.619Z\",\"@version\":\"1\",\"message\":\"[200] GET /documentation/1.0/requests/show.html (apipie/apipies#index)\"}"], "@version"=>"1", "@timestamp"=>"2016-06-08T09:21:32.943Z", "host"=>"5e9879d9bb52", "path"=>"/logs/development.log", "type"=>"ruby-logger", "timestamp"=>["I, [2016-06-08T09:21:32.627029 #1] INFO -- : {\"method\":\"GET\",\"path\":\"/documentation/1.0/requests/show.html\",\"format\":\"html\",\"controller\":\"apipie/apipies\",\"action\":\"index\",\"status\":200,\"duration\":1077.15,\"view\":362.97,\"db\":0.0,\"@timestamp\":\"2016-06-08T09:21:32.619Z\",\"@version\":\"1\",\"message\":\"[200] GET /documentation/1.0/requests/show.html (apipie/apipies#index)\"}", "2016-06-08T09:21:32.627029"], "pid"=>"1", "loglevel"=>"INFO"}, "path"], "type"=>[{"message"=>["I, [2016-06-08T09:21:32.627029 #1] INFO -- : {\"method\":\"GET\",\"path\":\"/documentation/1.0/requests/show.html\",\"format\":\"html\",\"controller\":\"apipie/apipies\",\"action\":\"index\",\"status\":200,\"duration\":1077.15,\"view\":362.97,\"db\":0.0,\"@timestamp\":\"2016-06-08T09:21:32.619Z\",\"@version\":\"1\",\"message\":\"[200] GET /documentation/1.0/requests/show.html (apipie/apipies#index)\"}", "{\"method\":\"GET\",\"path\":\"/documentation/1.0/requests/show.html\",\"format\":\"html\",\"controller\":\"apipie/apipies\",\"action\":\"index\",\"status\":200,\"duration\":1077.15,\"view\":362.97,\"db\":0.0,\"@timestamp\":\"2016-06-08T09:21:32.619Z\",\"@version\":\"1\",\"message\":\"[200] GET /documentation/1.0/requests/show.html (apipie/apipies#index)\"}"], "@version"=>"1", "@timestamp"=>"2016-06-08T09:21:32.943Z", "host"=>"5e9879d9bb52", "path"=>"/logs/development.log", "type"=>"ruby-logger", "timestamp"=>["I, [2016-06-08T09:21:32.627029 #1] INFO -- : {\"method\":\"GET\",\"path\":\"/documentation/1.0/requests/show.html\",\"format\":\"html\",\"controller\":\"apipie/apipies\",\"action\":\"index\",\"status\":200,\"duration\":1077.15,\"view\":362.97,\"db\":0.0,\"@timestamp\":\"2016-06-08T09:21:32.619Z\",\"@version\":\"1\",\"message\":\"[200] GET /documentation/1.0/requests/show.html (apipie/apipies#index)\"}", "2016-06-08T09:21:32.627029"], "pid"=>"1", "loglevel"=>"INFO"}, "type"], "[type]"=>[{"message"=>["I, [2016-06-08T09:21:32.627029 #1] INFO -- : {\"method\":\"GET\",\"path\":\"/documentation/1.0/requests/show.html\",\"format\":\"html\",\"controller\":\"apipie/apipies\",\"action\":\"index\",\"status\":200,\"duration\":1077.15,\"view\":362.97,\"db\":0.0,\"@timestamp\":\"2016-06-08T09:21:32.619Z\",\"@version\":\"1\",\"message\":\"[200] GET /documentation/1.0/requests/show.html (apipie/apipies#index)\"}", "{\"method\":\"GET\",\"path\":\"/documentation/1.0/requests/show.html\",\"format\":\"html\",\"controller\":\"apipie/apipies\",\"action\":\"index\",\"status\":200,\"duration\":1077.15,\"view\":362.97,\"db\":0.0,\"@timestamp\":\"2016-06-08T09:21:32.619Z\",\"@version\":\"1\",\"message\":\"[200] GET /documentation/1.0/requests/show.html (apipie/apipies#index)\"}"], "@version"=>"1", "@timestamp"=>"2016-06-08T09:21:32.943Z", "host"=>"5e9879d9bb52", "path"=>"/logs/development.log", "type"=>"ruby-logger", "timestamp"=>["I, [2016-06-08T09:21:32.627029 #1] INFO -- : {\"method\":\"GET\",\"path\":\"/documentation/1.0/requests/show.html\",\"format\":\"html\",\"controller\":\"apipie/apipies\",\"action\":\"index\",\"status\":200,\"duration\":1077.15,\"view\":362.97,\"db\":0.0,\"@timestamp\":\"2016-06-08T09:21:32.619Z\",\"@version\":\"1\",\"message\":\"[200] GET /documentation/1.0/requests/show.html (apipie/apipies#index)\"}", "2016-06-08T09:21:32.627029"], "pid"=>"1", "loglevel"=>"INFO"}, "type"], "message"=>[{"message"=>["I, [2016-06-08T09:21:32.627029 #1] INFO -- : {\"method\":\"GET\",\"path\":\"/documentation/1.0/requests/show.html\",\"format\":\"html\",\"controller\":\"apipie/apipies\",\"action\":\"index\",\"status\":200,\"duration\":1077.15,\"view\":362.97,\"db\":0.0,\"@timestamp\":\"2016-06-08T09:21:32.619Z\",\"@version\":\"1\",\"message\":\"[200] GET /documentation/1.0/requests/show.html (apipie/apipies#index)\"}", "{\"method\":\"GET\",\"path\":\"/documentation/1.0/requests/show.html\",\"format\":\"html\",\"controller\":\"apipie/apipies\",\"action\":\"index\",\"status\":200,\"duration\":1077.15,\"view\":362.97,\"db\":0.0,\"@timestamp\":\"2016-06-08T09:21:32.619Z\",\"@version\":\"1\",\"message\":\"[200] GET /documentation/1.0/requests/show.html (apipie/apipies#index)\"}"], "@version"=>"1", "@timestamp"=>"2016-06-08T09:21:32.943Z", "host"=>"5e9879d9bb52", "path"=>"/logs/development.log", "type"=>"ruby-logger", "timestamp"=>["I, [2016-06-08T09:21:32.627029 #1] INFO -- : {\"method\":\"GET\",\"path\":\"/documentation/1.0/requests/show.html\",\"format\":\"html\",\"controller\":\"apipie/apipies\",\"action\":\"index\",\"status\":200,\"duration\":1077.15,\"view\":362.97,\"db\":0.0,\"@timestamp\":\"2016-06-08T09:21:32.619Z\",\"@version\":\"1\",\"message\":\"[200] GET /documentation/1.0/requests/show.html (apipie/apipies#index)\"}", "2016-06-08T09:21:32.627029"], "pid"=>"1", "loglevel"=>"INFO"}, "message"], "timestamp"=>[{"message"=>["I, [2016-06-08T09:21:32.627029 #1] INFO -- : {\"method\":\"GET\",\"path\":\"/documentation/1.0/requests/show.html\",\"format\":\"html\",\"controller\":\"apipie/apipies\",\"action\":\"index\",\"status\":200,\"duration\":1077.15,\"view\":362.97,\"db\":0.0,\"@timestamp\":\"2016-06-08T09:21:32.619Z\",\"@version\":\"1\",\"message\":\"[200] GET /documentation/1.0/requests/show.html (apipie/apipies#index)\"}", "{\"method\":\"GET\",\"path\":\"/documentation/1.0/requests/show.html\",\"format\":\"html\",\"controller\":\"apipie/apipies\",\"action\":\"index\",\"status\":200,\"duration\":1077.15,\"view\":362.97,\"db\":0.0,\"@timestamp\":\"2016-06-08T09:21:32.619Z\",\"@version\":\"1\",\"message\":\"[200] GET /documentation/1.0/requests/show.html (apipie/apipies#index)\"}"], "@version"=>"1", "@timestamp"=>"2016-06-08T09:21:32.943Z", "host"=>"5e9879d9bb52", "path"=>"/logs/development.log", "type"=>"ruby-logger", "timestamp"=>["I, [2016-06-08T09:21:32.627029 #1] INFO -- : {\"method\":\"GET\",\"path\":\"/documentation/1.0/requests/show.html\",\"format\":\"html\",\"controller\":\"apipie/apipies\",\"action\":\"index\",\"status\":200,\"duration\":1077.15,\"view\":362.97,\"db\":0.0,\"@timestamp\":\"2016-06-08T09:21:32.619Z\",\"@version\":\"1\",\"message\":\"[200] GET /documentation/1.0/requests/show.html (apipie/apipies#index)\"}", "2016-06-08T09:21:32.627029"], "pid"=>"1", "loglevel"=>"INFO"}, "timestamp"], "pid"=>[{"message"=>["I, [2016-06-08T09:21:32.627029 #1] INFO -- : {\"method\":\"GET\",\"path\":\"/documentation/1.0/requests/show.html\",\"format\":\"html\",\"controller\":\"apipie/apipies\",\"action\":\"index\",\"status\":200,\"duration\":1077.15,\"view\":362.97,\"db\":0.0,\"@timestamp\":\"2016-06-08T09:21:32.619Z\",\"@version\":\"1\",\"message\":\"[200] GET /documentation/1.0/requests/show.html (apipie/apipies#index)\"}", "{\"method\":\"GET\",\"path\":\"/documentation/1.0/requests/show.html\",\"format\":\"html\",\"controller\":\"apipie/apipies\",\"action\":\"index\",\"status\":200,\"duration\":1077.15,\"view\":362.97,\"db\":0.0,\"@timestamp\":\"2016-06-08T09:21:32.619Z\",\"@version\":\"1\",\"message\":\"[200] GET /documentation/1.0/requests/show.html (apipie/apipies#index)\"}"], "@version"=>"1", "@timestamp"=>"2016-06-08T09:21:32.943Z", "host"=>"5e9879d9bb52", "path"=>"/logs/development.log", "type"=>"ruby-logger", "timestamp"=>["I, [2016-06-08T09:21:32.627029 #1] INFO -- : {\"method\":\"GET\",\"path\":\"/documentation/1.0/requests/show.html\",\"format\":\"html\",\"controller\":\"apipie/apipies\",\"action\":\"index\",\"status\":200,\"duration\":1077.15,\"view\":362.97,\"db\":0.0,\"@timestamp\":\"2016-06-08T09:21:32.619Z\",\"@version\":\"1\",\"message\":\"[200] GET /documentation/1.0/requests/show.html (apipie/apipies#index)\"}", "2016-06-08T09:21:32.627029"], "pid"=>"1", "loglevel"=>"INFO"}, "pid"], "loglevel"=>[{"message"=>["I, [2016-06-08T09:21:32.627029 #1] INFO -- : {\"method\":\"GET\",\"path\":\"/documentation/1.0/requests/show.html\",\"format\":\"html\",\"controller\":\"apipie/apipies\",\"action\":\"index\",\"status\":200,\"duration\":1077.15,\"view\":362.97,\"db\":0.0,\"@timestamp\":\"2016-06-08T09:21:32.619Z\",\"@version\":\"1\",\"message\":\"[200] GET /documentation/1.0/requests/show.html (apipie/apipies#index)\"}", "{\"method\":\"GET\",\"path\":\"/documentation/1.0/requests/show.html\",\"format\":\"html\",\"controller\":\"apipie/apipies\",\"action\":\"index\",\"status\":200,\"duration\":1077.15,\"view\":362.97,\"db\":0.0,\"@timestamp\":\"2016-06-08T09:21:32.619Z\",\"@version\":\"1\",\"message\":\"[200] GET /documentation/1.0/requests/show.html (apipie/apipies#index)\"}"], "@version"=>"1", "@timestamp"=>"2016-06-08T09:21:32.943Z", "host"=>"5e9879d9bb52", "path"=>"/logs/development.log", "type"=>"ruby-logger", "timestamp"=>["I, [2016-06-08T09:21:32.627029 #1] INFO -- : {\"method\":\"GET\",\"path\":\"/documentation/1.0/requests/show.html\",\"format\":\"html\",\"controller\":\"apipie/apipies\",\"action\":\"index\",\"status\":200,\"duration\":1077.15,\"view\":362.97,\"db\":0.0,\"@timestamp\":\"2016-06-08T09:21:32.619Z\",\"@version\":\"1\",\"message\":\"[200] GET /documentation/1.0/requests/show.html (apipie/apipies#index)\"}", "2016-06-08T09:21:32.627029"], "pid"=>"1", "loglevel"=>"INFO"}, "loglevel"]}>>], :response=>{"create"=>{"_index"=>"logstash-2016.06.08", "_type"=>"ruby-logger", "_id"=>"AVUvUSGRC143TCtSzWRa", "status"=>400, "error"=>{"type"=>"mapper_parsing_exception", "reason"=>"Merging dynamic updates triggered a conflict: mapper [timestamp] of different type, current_type [string], merged_type [date]"}}}, :level=>:warn}
input {
file {
type => "ruby-logger"
path => "/logs/development.log"
}
}
filter{
if [type] == "ruby-logger" {
grok {
match => [ "message", "%{RUBY_LOGGER:timestamp}"]
}
}
}
output {
elasticsearch {
codec => json
hosts => "elasticsearch:9200"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment