Ship MongoDB Access and Transaction Logs into Kibana on Kubernetes

11/27/2018

MongoDB Replicaset installed in Kubernetes , EFK is our logging stack , but how can we get MongoDB access and transaction logs into kibana through this setup ? The Mongodb plugin of Fluentd is to store logs into Mongodb not to get its logs.

Thanks

-- Aly Ragab
efk
kubernetes
mongodb

1 Answer

12/31/2018

The issue is resolved after configuring MongoDB to show Queries verbosity as below:

 db.adminCommand( {
   setParameter: 1,
   logComponentVerbosity: {
      verbosity: 1,
      query: {
         verbosity: 2
      },
      storage: {
         verbosity: 2,
         journal: {
            verbosity: 1
         }
      },
      access: {
         verbosity: 2,
         journal: {
            verbosity: 1
         }
      }
   }
} )

and Setting up the Database Profiling : MongoDB Profiling

-- Aly Ragab
Source: StackOverflow