]> git.openstreetmap.org Git - chef.git/blobdiff - cookbooks/logstash/templates/default/logstash.conf.erb
Switch git.osm.org to letsencrypt
[chef.git] / cookbooks / logstash / templates / default / logstash.conf.erb
index 429370ea556c3afb418fb20433a3e57816d21f1d..6610cd414e2c906ba3342c17c0be1126b6fa1514 100644 (file)
@@ -43,6 +43,21 @@ filter {
         "[parameters][utf8]"
       ]
     }
+    if [duration] {
+      ruby {
+        code => "event['duration'] = Integer(event['duration'] * 1000000)"
+      }
+    }
+    if [db] {
+      ruby {
+        code => "event['db'] = Integer(event['db'] * 1000000)"
+      }
+    }
+    if [view] {
+      ruby {
+        code => "event['view'] = Integer(event['view'] * 1000000)"
+      }
+    }
   }
 
   if [host] =~ /^spike-/ {
@@ -58,7 +73,6 @@ filter {
 
 output {
   elasticsearch {
-    host => [ "127.0.0.1" ]
-    cluster => "<%= node[:elasticsearch][:cluster][:name] %>"
+    hosts => [ "127.0.0.1" ]
   }
 }