]> git.openstreetmap.org Git - chef.git/blobdiff - cookbooks/logstash/templates/default/logstash.conf.erb
Drop common but useless parameters from logstash
[chef.git] / cookbooks / logstash / templates / default / logstash.conf.erb
index f6c207a61d09de6360811b8a5a3b1b8f2c93a6e1..0ddab7b2fc651e5fff1bc993b520a52ab5de6786 100644 (file)
@@ -9,7 +9,7 @@ input {
 filter {
   if [type] == "apache" {
     grok {
-      match => [ "message", "%{COMBINEDAPACHELOG} %{NUMBER:duration:int}us %{WORD:request_id} %{NOTSPACE:ssl_protocol} %{NOTSPACE:ssl_cipher}" ]
+      match => [ "message", "%{COMBINEDAPACHELOG} %{NUMBER:duration:int}us %{NOTSPACE:request_id} %{NOTSPACE:ssl_protocol} %{NOTSPACE:ssl_cipher}" ]
     }
     date {
       match => [ "timestamp", "dd/MMM/yyyy:HH:mm:ss Z" ]
@@ -17,6 +17,13 @@ filter {
   } else if [type] == "rails" {
     json {
       source => "message"
+      remove_field => [
+        "message",
+        "[parameters][authenticity_token]",
+        "[parameters][pass_crypt]",
+        "[parameters][pass_crypt_confirmation]",
+        "[parameters][utf8]"
+      ]
     }
   }
 }
@@ -24,5 +31,6 @@ filter {
 output {
   elasticsearch {
     host => [ "127.0.0.1" ]
+    cluster => "<%= node[:elasticsearch][:cluster][:name] %>"
   }
 }