X-Git-Url: https://git.openstreetmap.org./chef.git/blobdiff_plain/50592aea120c51878eefe62dd226d3658b679f8c..e04617420b4bac3642d100626db7fbc939254d5c:/cookbooks/logstash/templates/default/logstash.conf.erb?ds=sidebyside diff --git a/cookbooks/logstash/templates/default/logstash.conf.erb b/cookbooks/logstash/templates/default/logstash.conf.erb index 429370ea5..6610cd414 100644 --- 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-/ { @@ -58,7 +73,6 @@ filter { output { elasticsearch { - host => [ "127.0.0.1" ] - cluster => "<%= node[:elasticsearch][:cluster][:name] %>" + hosts => [ "127.0.0.1" ] } }