]> git.openstreetmap.org Git - chef.git/commitdiff
Convert times in rails log entries to microseconds
authorTom Hughes <tom@compton.nu>
Wed, 1 Jun 2016 21:39:49 +0000 (22:39 +0100)
committerTom Hughes <tom@compton.nu>
Wed, 1 Jun 2016 21:39:49 +0000 (22:39 +0100)
cookbooks/logstash/templates/default/logstash.conf.erb

index fc577b9b42646038f09a6cdcf300dd004c8c605e..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-/ {