ruby - Duplicate data in kibana from logstash -



ruby - Duplicate data in kibana from logstash -

i'm trying display mongo info i've been collecting using logstash using mongostat tool. displays things suffix "b", "k", "g" signify byte, kilobyte, gigabyte, fine if i'm reading output, want throw kibana , display in graphical format see trends.

i've done several other log files , fine. when utilize grok filter fine i've added ruby filter , info seems duplicated in fields other logstash generated fields , new field created in ruby filter.

here relevant parts of conf file:

input { file { path => "/var/log/mongodb/mongostat.log" type => "mongostat" start_position => "end" } } filter { if [type] == "mongostat" { grok { patterns_dir => "/opt/logstash/patterns" match => ["message","###a bunch of filtering know works###"] add_tag => "mongostat" } if [mongomappedqualifier] == 'b' { ruby { code => "event['mongomappedkb'] = event['mongomapped'].to_f / 1024" } } if [mongomappedqualifier] == 'k' { ruby { code => "event['mongomappedkb'] = event['mongomapped'].to_f * 1" } } if [mongomappedqualifier] == 'm' { ruby { code => "event['mongomappedkb'] = event['mongomapped'].to_f * 1024" } } if [mongomappedqualifier] == 'g' { ruby { code => "event['mongomappedkb'] = event['mongomapped'].to_f * 1048576" } } } } output { if [type] == "mongostat" { redis { host => "redis" data_type => "list" key => "logstash-mongostat" } } }

any thought why or how can fixed?

ruby logstash kibana

Comments

Popular posts from this blog

formatting - SAS SQL Datepart function returning odd values -

c++ - Apple Mach-O Linker Error(Duplicate Symbols For Architecture armv7) -

php - Yii 2: Unable to find a class into the extension 'yii2-admin' -