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

mongotop / mongostat default authentication database is a mystery

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Minor - P4 Minor - P4
    • None
    • Affects Version/s: None
    • Component/s: mongostat, mongotop
    • Labels:
      None

      Both of these tools have the following output in their --help string:

      --authenticationDatabase arg          user source (defaults to dbname)
      

      I interpret this instruction as having two possible meanings (neither of which work):

      1. dbname could refer to another command-line parameter. But there is no such other parameter to these two tools. The tools perform a global function so a default database has no meaning.
      2. dbname could mean the literal string "dbname". If I create a user/pass for a database named "dbname" it works when I specify it as the --authenticationDatabase but not if I leave that parameter out.

      I am forced to conclude that --authenticationDatabase is actually a required parameter for these two tools when authentication is enabled.

      If there is a default database to auth against, I have not been able to find it. "admin" does not work. "test" does not work. "dbname" does not work.

      The help output for these two tools should be adjusted and a sensible default should be given (or auth param made mandatory).

            Assignee:
            gabriel.russell@mongodb.com Gabriel Russell (Inactive)
            Reporter:
            andrew.ryder@mongodb.com Andrew Ryder (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: