Search code examples
mongodbkubernetesefk

Ship MongoDB Access and Transaction Logs into Kibana on Kubernetes


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


Solution

  • 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