In the previous recipe, we saw how we can monitor various metrics from the MMS console. This is a great way to see all the stats in one place and get an overview of the health of the MongoDB instances and cluster. However, it is not possible to monitor the system continuously for the support personnel, and there has to be some mechanism to automatically send out alerts in the case of some threshold being exceeded. In this recipe, we will set up an alert whenever the page faults exceed 1000.
Refer to the Monitoring MongoDB instances on MMS recipe. This is the only prerequisite for this recipe.
Click on the Activity option from the left-hand side menu options and then click on Alert Settings. On the Alert Settings page, click on Add Alert.
Add a new alert for the host, which is a primary instance, if the page faults exceed a given number, which is 1000 page faults per minute in our case. The notification was chosen to be e-mail in...