]> git.openstreetmap.org Git - chef.git/blobdiff - cookbooks/logstash/templates/default/logstash.conf.erb
Handle request IDs with hyphens
[chef.git] / cookbooks / logstash / templates / default / logstash.conf.erb
index f6c207a61d09de6360811b8a5a3b1b8f2c93a6e1..7608e2b5b2555fd63a574cd5d0827c4ef56425f3 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" ]
@@ -18,11 +18,15 @@ filter {
     json {
       source => "message"
     }
+    mutate {
+      remove_field => [ "message" ]
+    }
   }
 }
 
 output {
   elasticsearch {
     host => [ "127.0.0.1" ]
+    cluster => "<%= node[:elasticsearch][:cluster][:name] %>"
   }
 }