Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-40370

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

    XMLWordPrintable

    Details

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

      Description

      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 >
      

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: