[SERVER-40370] db.enableFreeMonitoring() returns errmsg" : "no such command: 'setFreeMonitoring'", Created: 28/Mar/19  Updated: 02/Apr/19  Resolved: 02/Apr/19

Status: Closed
Project: Core Server
Component/s: Admin
Affects Version/s: 4.0.6
Fix Version/s: None

Type: Improvement Priority: Minor - P4
Reporter: Sheila Doyle Assignee: Andrew Morrow (Inactive)
Resolution: Won't Fix Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Sprint: Dev Tools 2019-04-08
Participants:
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 >


Generated at Thu Feb 08 04:54:46 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.