liveBook · Manning

Alerting

As explained in MongoDB 8.0 in Action, Third Edition

An alert is a configured notification generated when a monitored database, user, account, or deployment condition is met.

An Atlas alert is an automated notification triggered when a configured database, user, account, or cluster condition is met. Alerts help administrators catch performance and security problems without continually checking metrics. When triggered, Atlas displays a warning icon on the cluster and sends a notification through the configured channel. section 21.2 section 21.3.1

Choose conditions that call for a response, then set thresholds and notification channels:

  • Watch capacity and contention: high CPU steal can signal strain on burstable shared-CPU environments; more than 100 queued operations can signal delays; connections nearing 80%–90% of capacity can signal a scaling need. section 21.3.1
  • Watch query targeting for inefficient queries. A high value can point to queries that need optimization. section 21.3.1
  • Watch security-sensitive activity, such as unusual access patterns, failed logins, and changes to critical settings. section 20.7
atlas alerts settings create --event OUTSIDE_METRIC_THRESHOLD --enabled \
--metricName QUERY_TARGETING_SCANNED_OBJECTS_PER_RETURNED \
 --metricOperator GREATER_THAN --metricThreshold 1000 \
--metricUnits RAW --notificationType EMAIL --notificationEmailEnabled \
--notificationEmailAddress your-email@example.com \
--notificationIntervalMin 15

This Atlas CLI command creates an enabled query-targeting metric alert. It triggers when scanned objects per returned result exceed 1,000 and sends email notifications to the supplied address at a 15-minute interval. Replace the example address and choose a threshold appropriate to the condition you want to catch. section 21.3.1

Use `atlas alerts settings list` to inspect configured alerts and `atlas alerts settings describe` with an alert ID to inspect one setting. Pair notifications with deployment metrics and logs: metrics provide performance history, while logs provide activity history for troubleshooting. Have the team responsible for reliability review and respond to alerts promptly. section 21.3.1 section 21.3 section 21.2

How MongoDB 8.0 in Action, Third Edition covers it

How deep it goes
Explains conditions, sample thresholds, delivery channels, and CLI creation and inspection; does not detail notification-service setup.
Examples
Shows CPU steal, queue, query-targeting, and connection thresholds alongside an Atlas CLI email-alert command.
What it assumes
Assumes an Atlas cluster to monitor and introduces alert conditions without requiring an existing alert configuration.
What you can do after
Operate/configure it: create a metric alert with the Atlas CLI, inspect alert settings, and route notifications for response.
How it connects
Connects alerting to cluster metrics, query targeting, logging, performance tuning, and security monitoring.

Also explained in

Compare how 10 books explain alerting →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of MongoDB 8.0 in Action, Third Edition. The section links point to the parts of the book it draws on.