Issue with logstash filter


(Ashwin ) #1

Hello Everyone,

I am using below command to load mongodb stats to elastic search using logstatsh.

input {
exec {
command => "mongo test_mongo_db_1 --eval 'db.stats()' --quiet"
interval => 7
type => "db.stats"

    }
 }

filter {
json {
source => "message"
}
}

output {
elasticsearch {
hosts => ["localhost:9200"]
index => ["mongstats"]
}

}

so, this should load only message part right, but its loading everything even the command it's running.
Is it expected?

thanks,
Ashwin


(Christian Dahlqvist) #2

Have you looked into instead using Metricbeat, which has support for MongoDB data collection?


(Ashwin ) #3

@Christian_Dahlqvist Thanks for your suggestion, I have installed metric beat but there is an existing issue with dbstats and we have a solution too. can you help me apply this changes to existing installation below is the link for the fix.
I could not find the module dir that's mentioned in the fix.

Any help is highly appreciated.

Thanks,
Ashwin


(Christian Dahlqvist) #4

It looks like it has been merged and will be included in Metricbeat 6.0.


(system) #5

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.