In the previous recipe, we saw how to set up an MMS account and set up an MMS agent. In this recipe, we will throw some light on how to set up the groups and user access to the MMS console.
Refer to the previous recipe for setting up the agent and MMS account. This is the only prerequisite for this recipe.
Here, you can view the existing users and also add new users. On clicking the Add User (encircled in the top right corner of the preceding image) button, you should see the following popup window that allows you to add a new user:
The preceding screen will be used to add users. Take a note of the various available roles.
The tasks we did in the recipe are pretty straightforward and don't need a lot of explanation except for one question. When and why do we add a group? It is when we want to segregate our MongoDB instances by different environments or applications. There will be a different MMS agent running for each group. Creating a new group is necessary when we want to have separate monitoring groups for different environments of an application (Development, QA, Production, and so on), and each group has different privileges for the users. That is, the same agent cannot be used for two different groups. While configuring the MMS agent, we give it an API key unique to the group. To view the API key for the group, select the appropriate group from the drop-down menu at the top of the screen (if your user has access to only group, the drop-down menu won't be seen) and go to Administration | Group Settings as shown in the next screenshot. The Group ID and the API Key will both be shown on the top of the page.
Note that not all user roles will see this option. For example, read-only users can only personalize their profile and most of the other options will not be visible.