projects
/
chef.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
96170ed
)
Convert times in rails log entries to microseconds
author
Tom Hughes
<tom@compton.nu>
Wed, 1 Jun 2016 21:39:49 +0000
(22:39 +0100)
committer
Tom Hughes
<tom@compton.nu>
Wed, 1 Jun 2016 21:39:49 +0000
(22:39 +0100)
cookbooks/logstash/templates/default/logstash.conf.erb
patch
|
blob
|
history
diff --git
a/cookbooks/logstash/templates/default/logstash.conf.erb
b/cookbooks/logstash/templates/default/logstash.conf.erb
index fc577b9b42646038f09a6cdcf300dd004c8c605e..6610cd414e2c906ba3342c17c0be1126b6fa1514 100644
(file)
--- a/
cookbooks/logstash/templates/default/logstash.conf.erb
+++ b/
cookbooks/logstash/templates/default/logstash.conf.erb
@@
-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-/ {