rueckstiess / mtools

A collection of scripts to set up MongoDB test environments and parse and visualize MongoDB log files.
Apache License 2.0
1.89k stars 404 forks source link

mloginfo: Improve --clients such that it includes more info for each Driver x Version x Application that has connected. #850

Closed akung0324 closed 2 years ago

akung0324 commented 2 years ago

Expected behavior

For each Driver Name and Driver Version (2-tuple) or Driver Name and Driver Version and Application Name (3-tuple) that connects list not only the IPs that have connected but also the database users that have authenticated. Also include the number of connections and authentications where relevant.

The Application Name is optional in the client data which is logged which is why the information provided will sometimes just be for the Driver Name and Driver Version (2-tuple).

Example Output (New Behavior)

Driver: PyMongo | Version: 3.8.0

Driver: mongo-go-driver | Version: v1.3.4 | App: MongoDB Backup Module v11.5.1.7087

Actual/current behavior

Currently the --clients option outputs the list of IP addresses that has connected for each Driver Name and Driver Version (2-tuple). It does not provide any information about the application names connecting (if provided) or the database users that have authenticated.

Example Output (Existing Behavior)

Driver:Version - Unique connections PyMongo:3.8.0 : ['10.118.67.176', '10.118.120.0', '10.118.63.36', '10.118.25.211'] mongo-go-driver:v1.3.4 : ['10.118.120.0']