Drop common but useless parameters from 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 %{NOTSPACE: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       remove_field => [
21         "message",
22         "[parameters][authenticity_token]",
23         "[parameters][pass_crypt]",
24         "[parameters][pass_crypt_confirmation]",
25         "[parameters][utf8]"
26       ]
27     }
28   }
29 }
30
31 output {
32   elasticsearch {
33     host => [ "127.0.0.1" ]
34     cluster => "<%= node[:elasticsearch][:cluster][:name] %>"
35   }
36 }