Uploaded image for project: 'MongoDB Database Tools'
  1. MongoDB Database Tools
  2. TOOLS-2402

New CLI tool to list current incoming connections by source, user, driver

    • Type: Icon: Epic Epic
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Labels:
    • TOOLS Connection tracker
    • 0

      It's hard for Enterprise customers with large deployments to track back to badly performing client applications based on existing tools. There are mtools options available which analyze log files, but these are neither officially supported nor able to run on "live" data.

      I propose a new command line tool called "mongoconn" or similar which can connect to a mongod or mongos and show a sort of live view with the sources of incoming connections and count, grouped by IP address.

      Some parameters like --group user and -group driver could further group connection counts by the auth user and/or the driver and version being used. This additional detailed should make it easier to track down a misbehaving microservice based on this footprint. The IP address alone might not be enough since one host might have many different microservices running inside pods.

      It could possibly use db.runCommand( { "connPoolStats" : 1 } ) under the hood to prepare output like:

      Source IP Number of connections New connections (60s) Average connection duration (5m)       1237            74            625s


      Source IP      User   Number of connections New connections (60s) Average connection duration (5m)          app1      654     32        705s          app2     583     42        515s


            Unassigned Unassigned
            nicholas.cottrell@mongodb.com Nic Cottrell
            0 Vote for this issue
            3 Start watching this issue