How to format mongodb slow log and produce fingerprint?

hi how to format mongodb slow log and produce fingerprint?
Is there an plugin or tool to do this ?
thanks all!

Welcome to the MongoDB Community!

What version of MongoDB server are you using and what sort of fingerprint information are you looking for?

Slow query log lines have information you can use to identify queries, and newer releases generally have more diagnostic info.

For example, from the documentation on Logging Slow Operations:

Starting in MongoDB 4.2, the profiler entries and the diagnostic log messages (i.e. mongod/mongos log messages) for read/write operations include:

  • queryHash to help identify slow queries with the same query shape.
  • planCacheKey to provide more insight into the query plan cache for slow queries.

Regards,
Stennie

thanks for your reply!I have 3.2 3.6 4.0 4.3 versions and there are more than one thousand instances togather. my goal is to collect all slow queries from all mongodb instances and format the SQL and produce an fingerprint to a query. then statis the top N for a business or satisfy other requirements。