Alerts
Table of Contents:
Alerts monitor a specific metric and notify you when the metric meets conditions you set. They are useful for becoming aware of issues early without having to frequently check Monti APM.
Creating Alerts
The alerts window can be opened from the header when viewing an app. If you have no alerts, it will show the create screen. Otherwise, click the Create new
button.
The questions in each line are for:
- The metric the alert monitors
- The condition the metric should meet to notify you
- How long the condition should be met, in minutes.
- If the condition should be met on any or all hosts before notifying you
Next, you can add any emails or webhooks that should be notified.
When creating alerts you will want to find a balance between:
- Being notified when there is an issue. Whenever you encounter a production issue, you can create an alert to let you know if it re-occurs
- Alert fatigue. If you receive too many notifications that are not important, you will likely stop paying attention to them and miss an important issue. If an alert is armed too often, consider modifying the conditions or duration so it only notifies you when there is an issue you have to act on.
Alert Suggestions
These are good starting points for most apps.
- New Errors
- CPU usage is over 80% for one minute
- High memory usage
- Method response time is over 1,000ms for 2 minutes
- Host count is low. If the majority of your servers are not responding for several minutes, there is a higher risk of the remaining servers going down later.
Is there an alert you've found to be useful? Let us know.
Slack Notifications
Monti APM is able to send messages to your slack workspace using webhooks.
- Add the Incoming WebHooks app to your workspace
- Choose a channel for the messages to appear in and click
Add
- Copy the webhook URL and add to the alert in Monti APM
To make sure everything works, click the Fire a Test Alert
button. You should see a new message in slack.
Webhooks
Webhooks allow Monti APM to notify services when an alert triggers or clears. You can create your own integration, or use them to integrate into other services, for example to send an SMS message with Zapier.
When the alert is armed, Monti APM sends a POST request to the webhook URL with the content-type application/json
. The body is in this format:
{
"name": "Alert name",
"appId": "app id",
"enabled": true,
"appName": "App name",
"created": "2018-09-16T13:30:40.978Z", // Date alert was created
"createdBy": "user id", // Id of user who created the alert
"status": "triggered",
"result": { // Object with the values used to check if the alert triggered. Format depends on alert type and settings.
"success": true,
"data": {
"server-host-name": {
"success": true,
"data": {
"success": true,
"data": {
"value": 56.5,
"timestamp": 1578970626742
}
}
}
}
},
"triggered": 1578974166802 // Timestamp of when alert triggered
}
When cleared, the webhook body will look like:
{
"name": "Alert name",
"appId": "app id",
"enabled": true,
"appName": "App name",
"created": "2018-09-16T13:330:40.978Z",
"createdBy": "user id", // Id of user who created the alert
"status": "cleared",
"triggered": 1596475369935 // Timestamp of when alert triggered
}
To test the webhook, click the Fire a Test Alert
button in the alert edit screen.