How to make mongotop/mongostat work for a specific database user that does not have an admin role?

Hi @Divine_Cutler, The information you need can be found in the MongoDB documentation.

For mongotop the user needs to have both serverStatus and top privileges.

For mongostat the user needs to have serverStatus privileges.

The built in clusterManager role has these two privileges plus more that a monitoring admin might need, so it might fit your needs as well.

1 Like