Add support for storing web logs in logstash
[chef.git] / cookbooks / logstash / templates / default / logstash.conf.erb
1 input {
2   lumberjack {
3     port => 5043
4     ssl_certificate => "/var/lib/logstash/lumberjack.crt"
5     ssl_key => "/var/lib/logstash/lumberjack.key"
6   }
7 }
8
9 filter {
10   if [type] == "apache" {
11     grok {
12       match => [ "message", "%{COMBINEDAPACHELOG} %{NUMBER:duration:int}us %{WORD:request_id} %{NOTSPACE:ssl_protocol} %{NOTSPACE:ssl_cipher}" ]
13     }
14     date {
15       match => [ "timestamp", "dd/MMM/yyyy:HH:mm:ss Z" ]
16     }
17   } else if [type] == "rails" {
18     json {
19       source => "message"
20     }
21   }
22 }
23
24 output {
25   elasticsearch {
26     host => [ "127.0.0.1" ]
27   }
28 }