db.enableFreeMonitoring() returns errmsg" : "no such command: 'setFreeMonitoring'",

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Won't Fix
    • Priority: Minor - P4
    • None
    • Affects Version/s: 4.0.6
    • Component/s: Admin
    • None
    • Dev Tools 2019-04-08
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None

      Starting in version 4.0, MongoDB (Community Edition) offers free Cloud monitoring for stand alone and replica sets.

      However the method db.enableFreeMonitoring() is available to call from Enterprise edition but it errors with errmsg "no such command: 'setFreeMonitoring'", because it makes a call to setFreeMonitoring() which does  not appear to be available:

      { assert.commandWorked(this.adminCommand(\{setFreeMonitoring: 1, action: 'enable'}));}
      

       
      Requesting that a more user friendly message is returned, e.g

      'db.enableFreeMonitoring() not available, use Ops Manager or Cloud Manager to monitor your  Enterprise deployment' 

      See result of calling db.enableFreeMonitoring() below:

      =========================================================================================== 

      MongoDB Enterprise > db.enableFreeMonitoring()
      2019-03-28T13:51:21.365+0000 E QUERY    [js] Error: command failed:
      { "ok" : 0, "errmsg" : "no such command: 'setFreeMonitoring'", "code" : 59, "codeName" : "CommandNotFound" }:
      _getErrorWithCode@src/mongo/shell/utils.js:25:13
      doassert@src/mongo/shell/assert.js:18:14
      _assertCommandWorked@src/mongo/shell/assert.js:536:17
      assert.commandWorked@src/mongo/shell/assert.js:620:16
      DB.prototype.enableFreeMonitoring@src/mongo/shell/db.js:1967:1
      @(shell):1:1
      MongoDB Enterprise >
      

            Assignee:
            Andrew Morrow (Inactive)
            Reporter:
            Sheila Doyle
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved: