Getting Data In

Is there, or will there be, an app or add-on to perform activity monitoring for MongoDB?

curryRick
Explorer

Is there, or will there be, an app or add-on to perform activity monitoring for MongoDB as there is for Oracle, MS SQL Server and MySQL? Hunk App for MongoDB seems to be only for data collection.

Tags (3)
0 Karma
1 Solution

rdagan_splunk
Splunk Employee
Splunk Employee

Currently there is no such a thing.

However, MongoDB writes its log into /var/log/mongodb/mongodb.log
Just make sure you turn on the profiling: db.setProfilingLevel(1,50)

Then all you need is to create an Splunk inputs.conf and you are good to go.
For example,

MongoDB Log

[monitor:///var/log/mongodb/mongodb]
sourcetype = mongodb_profile
index = mongodb_metrics

Configuration Files

CLI Scripted Inputs

OS Scripted Inputs

[script://./bin/mongodb_cpu.sh]
interval = 30
sourcetype = cpu
source = cpu
index = mongodb_os
disabled = 0
** If you download Splunk *Nix App you can find many of these scripts to monitor these Linux resources

View solution in original post

rdagan_splunk
Splunk Employee
Splunk Employee

Currently there is no such a thing.

However, MongoDB writes its log into /var/log/mongodb/mongodb.log
Just make sure you turn on the profiling: db.setProfilingLevel(1,50)

Then all you need is to create an Splunk inputs.conf and you are good to go.
For example,

MongoDB Log

[monitor:///var/log/mongodb/mongodb]
sourcetype = mongodb_profile
index = mongodb_metrics

Configuration Files

CLI Scripted Inputs

OS Scripted Inputs

[script://./bin/mongodb_cpu.sh]
interval = 30
sourcetype = cpu
source = cpu
index = mongodb_os
disabled = 0
** If you download Splunk *Nix App you can find many of these scripts to monitor these Linux resources

curryRick
Explorer

Thank you for this information. The one issue still to resolve is the formatting of the log; it is BSON (Binary-encoded JSON).

0 Karma
Get Updates on the Splunk Community!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

March 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...