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

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

    XMLWordPrintable

    Details

    • Type: Epic
    • Status: Open
    • Priority: Major - P3
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • Epic Name:
      TOOLS Connection tracker

      Description

      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)
      1.2.3.4       1237            74            625s
      

      and

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

       

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              nicholas.cottrell Nicholas Cottrell
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated: