My MongoDB crashed and I am trying to understand why. On Ubuntu MongoDB produces files in /var/lib/mongodb/diagnostic.data
. Those files, e.g. metrics.2016-03-08T17-15-01Z0
, are binary files.
What tool should I use to analyse MongoDB diagnostic files? What data do the diagnostic files have?
MongoDB logs can be found in the MongoDB log files at /var/log/mongodb/mongodb. log. If you can't find the log files from this location, you can check the mongodb. conf.
The diagnostic. data file contains the result of db. serverStatus() command in binary format. This will be used by the MongoDB engineers to analyze the behavior of the server if any error happens. It is not necessary to take a backup of this file.
Full Time Diagnostic Data Capture (FTDC) was introduced in MongoDB 3.2 (via SERVER-19585), to incrementally collect the results of certain diagnostic commands to assist MongoDB support with troubleshooting issues. On log rotation or startup, a mongod or mongos will collect and log: getCmdLineOpts : db.
You can see the contained data of the metrics...
files using the tool bsondump
which is included in every MongoDB installation.
Just execute bsondump metrics.2016-03-08T17-15-01Z0
and it will print out the decoded content of the file.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With