How to check if Mongodb enterprise is in use
In MongoDB version 3.6 you can get the information if the enterprise modules have been built or not via mongo shell and the output of
db.serverBuildInfo().modules
On Enterprise it will state:
[ "enterprise" ]
On Community an empty array should be shown.
I recently asked this question on MongoDB JIRA. Here's reply:
There are at least three ways to discover if you're running Enterprise, I'll leave it to you to determine the easiest for your case:
1) In recent versions of Ops Manager / Cloud Manager a marker is placed after the version number as "-ent". For example, 2.6.11 would be shown as "2.6.11-ent".
2) In a Mongo shell you can check the connected server by running db.serverBuildInfo().gitVersion. Example output on 2.6.9:
>db.serverBuildInfo().gitVersion
df313bc75aa94d192330cb92756fc486ea604e64 modules: enterprise
Note the "modules: enterprise" is only shown for Enterprise versions.
3) If you have just the binary, you can check the version with the --version flag on the command-line. For example:
mongod --version
db version v2.6.9
git version: df313bc75aa94d192330cb92756fc486ea604e64 modules: enterprise
OpenSSL version: OpenSSL 1.0.1m-fips 19 Mar 2015
Note the "modules: enterprise" is only shown for Enterprise versions.