Cloud Monitoring, Backup and Cost Optimization
IntermediateLesson 8 of 8 in Cloud Architecture and Administration Course
What you will learn
- Read the numbers and events that cloud resources produce, collect the data the platform does not gather by itself, and query logs to find out what happened.
- Read and collect resource metricsExplain what a metric is, read metric charts with the right statistic and time grain, and collect guest-level metrics that the platform does not provide automatically.
- Collect, route and query logsTell the kinds of cloud logs apart, send resource and guest logs to a workspace, write basic queries to answer operational questions, and set retention that controls cost.
- Read and collect resource metrics
- Turn metrics, log queries and platform events into alert rules that fire for real problems, and route each alert to the people or automation that can act on it.
- Write alert rules with sound conditionsDefine the signal, threshold, evaluation window and severity of an alert rule so that it catches lasting problems without firing on harmless spikes or missing data.
- Route alerts with action groups and notificationsConnect alert rules to notifications and automated responses, suppress or combine alerts to cut noise, and test that every route works.
- Write alert rules with sound conditions
- Choose vaults and backup policies that meet recovery point and retention needs, protect the backups themselves from deletion and ransomware, and prove they work by restoring them.
- Set up backup vaults and policiesPick the right vault for each workload, write backup policies whose schedule meets the recovery point objective and whose retention meets the requirements, and keep copies away from the source.
- Secure backups against deletion and ransomwareUse soft delete, immutability, separate permissions, encryption and isolated copies so that an attacker or a mistake cannot remove the backups you need.
- Restore data and test backupsChoose a recovery point and restore option, restore safely without overwriting good data, and test restores and backup reports regularly against the recovery time objective.
- Set up backup vaults and policies
- Replicate servers to a recovery region, organize them into recovery plans, and rehearse and carry out failover and failback while measuring the recovery times you achieve.
- Replicate workloads for site recoverySet up continuous replication of virtual machines and servers to another region, group them into recovery plans, and include the dependencies a recovered application needs.
- Run failover drills and real failoversCarry out test failovers without touching production, perform failover, commit, reprotection and failback in the right order, redirect traffic, and compare the measured recovery times with the targets.
- Replicate workloads for site recovery
- Match compute to what workloads actually use, stop paying for idle time, and buy reservations or savings plans for the steady part of the remaining usage.
- Rightsize and schedule computeUse utilization data and provider recommendations to pick smaller or better-suited instance sizes, stop non-production machines when nobody uses them, and match capacity to demand.
- Choose between reservations and savings plansCompare reserved capacity and savings plans by what they commit to, how flexible they are and how deep their discount is, and choose the right mix for steady and changing workloads.
- Size commitments and track their useFind the steady baseline worth committing to, calculate the commitment and the savings, check the break-even point, and monitor utilization and coverage after the purchase.
- Rightsize and schedule compute
- Place data in the storage tier that matches how often it is read, automate tier changes and deletion with lifecycle rules, and find and remove storage and network resources that nobody uses.
- Choose storage tiers and lifecycle rulesCompare object storage tiers by storage price, access cost, minimum duration and retrieval time, and write lifecycle rules that move or delete data automatically.
- Find and remove unused resources and dataFind idle and orphaned resources with provider tools and queries, remove them through a safe process, and stop new waste from building up.
- Choose storage tiers and lifecycle rules
Cloud Monitoring study guide
1Monitor cloud resources with metrics and logs
A resource can look healthy on one chart while users are waiting for it. Monitoring starts by choosing what to measure, how often to collect it, and how much detail to keep. Metrics show changing numbers; logs show individual events. Read both with a clear question in mind, then collect the guest and service data that the cloud platform does not gather for you. The choices you make also determine what evidence will be available after an incident.
1.1 Read and collect resource metrics
A metric is a sequence of numeric measurements with timestamps. To read one correctly, identify the resource, the measurement, and the way the chart summarizes it. A line labeled "CPU" leaves too much unspecified to guide a capacity decision.
Identify the series and collect the missing data
CloudWatch identifies a metric by its namespace, name, and dimensions. For example, AWS/EC2, CPUUtilization, and InstanceId=i-0abc123 identify CPU use for one EC2 instance. Dimensions are name/value pairs that separate series. Azure Monitor can split storage Transactions by ResponseType to show successes and throttling separately. For a custom CloudWatch metric, query a dimension combination that was actually published; publishing individual series does not create every possible aggregate.
Platform metrics arrive without an agent. Azure normally collects them every minute, keeps them for 93 days, and displays up to 30 days on one metrics explorer chart. EC2 basic monitoring sends metrics every 5 minutes; paid detailed monitoring sends them every minute. Guest memory, volume free space, and process counters need collection inside the operating system. Use the CloudWatch agent or Azure Monitor Agent with a data collection rule. An absent memory chart means missing evidence, not spare memory.
Choose the statistic and period
A chart point summarizes samples within a period, also called time grain. Average shows the overall level; Maximum exposes peaks; Minimum finds the lowest reading; Sum totals counts or amounts; Count or SampleCount counts observations. A percentile such as p95 or p99 describes a value at or below which about 95% of observations fall, making high percentiles useful for busy or slow cases.
Five one-minute CPU values are 20%, 22%, 25%, 21%, and 95%. Add them to get 183, then divide by 5 to get an average of 36.6%. The maximum is 95%. A five-minute Average chart hides the size of the brief spike. Check a shorter period and Maximum before concluding that the VM has ample headroom.
A total also depends on its period. A NetworkIn Sum of 600 MB over 5 minutes is 600 divided by 300 seconds, or 2 MB/s. A Sum of 120 MB over 1 minute is also 2 MB/s. Comparing 600 with 120 without comparing their periods would falsely suggest five times as much traffic per second.
Keep useful history
CloudWatch retains sub-minute custom points for 3 hours, one-minute points for 15 days, five-minute points for 63 days, and hourly points for 455 days (15 months). Older measurements are rolled into coarser periods. You can study last year's hourly trend, but cannot recover its busiest individual minute from that history. Azure diagnostic settings can send supported platform metrics to Log Analytics for longer-term analysis.
Custom metrics, such as orders per minute or queue length, add application-specific measurements through CloudWatch APIs or embedded metric format and Azure custom or OpenTelemetry metrics. CloudWatch dashboards, Azure dashboards, and workbooks collect charts in one place. Azure Monitor Insights supplies ready-made resource views. These views support investigation; alert rules provide unattended detection.
Key Takeaways
- Match the metric name and dimensions to the resource you mean to inspect.
- Collect guest memory and disk-space metrics with an agent.
- Check period, statistic, unit, and time range before comparing charts.
- Use peaks and high percentiles alongside averages when checking capacity.
- Older metric history may retain the trend but lose short spikes.
1.2 Collect, route and query logs
A log entry records an event at a time, with text or named fields. A metric can show that failures increased. Logs can reveal which request failed, what error occurred, and who changed the configuration.
Collect the right event stream
Control-plane logs record administration: Azure activity log and AWS CloudTrail show changes to resources. Resource logs record service activity, such as storage reads or Key Vault access. Guest logs come from the operating system and applications, including syslog, Windows events, and application files.
Azure collects the activity log automatically and retains it for 90 days. Resource logs need a diagnostic setting that selects categories and destinations. Send them to Log Analytics for queries and alerts, a storage account for archiving, Event Hubs for streaming, or a supported partner. Enable collection before an incident: a later setting cannot recover resource events that were never collected.
Azure Monitor Agent uses a data collection rule to select guest events, counters, and a destination workspace. The CloudWatch agent sends files into log streams inside log groups. CloudTrail event history retains 90 days of management events; configure a trail for longer-term delivery to S3 or CloudWatch Logs.
Ask a question with a query
Log Analytics stores tables such as Heartbeat, Perf, Syslog, and AzureActivity. Kusto Query Language, or KQL, passes rows through operators separated by a pipe. where filters, project selects columns, and summarize aggregates rows.
Heartbeat
| summarize LastSeen = max(TimeGenerated) by Computer
| where LastSeen < ago(15m)
First find each computer's latest heartbeat, then keep the computers whose latest heartbeat is more than 15 minutes old. A computer with no rows in the queried history will not appear; compare the results with the expected machine inventory when checking complete coverage.
For hourly CPU trends, filter Perf to ObjectName == "Processor" and CounterName == "% Processor Time", then summarize avg(CounterValue) by Computer and bin(TimeGenerated, 1h). Filter time and resources early to scan less data. After summarizing, only the grouped columns and calculated values remain, so project or filter other fields before that step.
CloudWatch Logs Insights has a different syntax:
fields @timestamp, @message
| filter @message like /ERROR/
| stats count(*) as errors by bin(5m)
This counts matching error lines in five-minute buckets. A metric filter can turn matching lines into a metric for an alarm.
Control ingestion and retention
A VM sending 2 GB daily produces about 60 GB in 30 days. Select useful event levels and remove unneeded debug output before ingestion. Azure Analytics tables normally retain 30 days, with AzureActivity and Usage retaining 90 days without retention charges. Analytics retention can extend to 2 years and total retention to 12 years using long-term storage and search jobs. The first 31 days are included in ingestion pricing, so reducing retention below 31 days does not reduce that charge.
CloudWatch Logs keeps data indefinitely unless a retention period is set. Exporting it to S3 creates another copy; the original stays until its own retention removes it. Choose an operational query window and a separate archive period from the actual investigation and retention needs.
Key Takeaways
- Use control-plane logs for resource changes and resource or guest logs for service and application events.
- Enable resource diagnostics before you need the events.
- Filter early; summarize only after preserving the fields the query needs.
- Set retention on the original log store even when you export an archive.
2Set up alerts that reach the right people
An alert is useful when a real problem reaches someone who can act. Its condition must match the signal's meaning, distinguish a lasting fault from a short spike, and handle missing measurements. Its route must match the urgency and owner. Build these as two connected parts: detection and response. Test both parts before relying on them, including maintenance suppression, automated actions, and the notification that says the problem has cleared.
2.1 Write alert rules with sound conditions
Start an alert rule with a concrete operational question: "Has this VM stayed overloaded?" or "Was a production resource deleted?" Specify the resources in scope, signal, statistic, operator, threshold, evaluation timing, severity, and actions.
Choose the signal and condition
Metric alerts suit numeric limits. Log search alerts run a query and test a row count or calculated value. Activity log alerts detect events, including resource deletes, Service Health incidents, and Resource Health changes. Azure activity log alerts are stateless and fire for each matching event; stateful metric alerts track whether a condition is active.
A static threshold suits a fixed limit such as a disk exceeding 90% full. Azure dynamic thresholds and CloudWatch anomaly detection compare observations with learned daily or weekly patterns. They help when a request count normally rises and falls during the day. A predictable daytime increase should not produce the same response as an unusual drop during business hours.
Evaluate several periods
CloudWatch alarms have OK, ALARM, and INSUFFICIENT_DATA states. In an M out of N rule, N is the number of recent periods evaluated and M is the number that must breach. The statistic is calculated separately for each period; the alarm then counts breaching periods.
For average CPU above 80%, use a 60-second period and 3 out of 5 datapoints. Values of 72, 85, 91, 78, and 88 contain three breaches, so the alarm enters ALARM. Change 91 to 79 and only two breach, so it remains OK. The breaches need not be consecutive. A single spike is filtered out, while sustained overload can meet the condition after three breaching minutes.
CloudWatch notification actions normally run on a state change, not every minute of a continuing alarm. Auto Scaling actions are an exception: they continue once a minute while the alarm remains in the new state. Azure metric alerts have separate aggregation and evaluation settings, such as a 15-minute average checked every 5 minutes. They are stateful by default and resolve after three consecutive checks no longer meet the condition. A human marking an alert "Acknowledged" changes its response status, not the measured condition.
Decide what silence means
For CloudWatch, missing is the default missing-data choice; an entirely missing evaluation range leads to INSUFFICIENT_DATA. breaching treats missing points as failures, notBreaching as acceptable, and ignore keeps the current state. A continuously reporting health metric can justify treating silence as failure. An event-only error counter may be silent because no error happened, so treating every missing point as failure would create false alarms.
Severity directs attention. Azure uses Sev0 critical, Sev1 error, Sev2 warning, Sev3 informational, and Sev4 verbose. Use the highest levels for faults needing immediate action. Review rules that trigger harmless daily notifications, and attach a working action group or notification topic. One Azure metric rule can watch supported resources of the same type in one region and evaluate each resource separately.
Key Takeaways
- Define scope, signal, condition, timing, severity, and response together.
- Count breaches per period in an M out of N alarm; they need not be consecutive.
- Choose missing-data behavior from how the metric reports.
- Keep the measured alert state separate from the responder's acknowledgment.
- Dynamic thresholds suit changing normal patterns; fixed limits suit static thresholds.
- Attach actions and review rules that repeatedly fire without useful work.
2.2 Route alerts with action groups and notifications
Detection and delivery can fail independently. An alert record may show the right condition while nobody receives a message. Make the delivery path explicit: rule, response group or topic, receiver, and accountable owner.
Reuse routes and match urgency
An Azure action group holds notifications and automated actions. Notifications include email, SMS, mobile push, voice, and email to members of an Azure Resource Manager role. Actions include a runbook, Function, Logic App, webhook, secure webhook, ITSM connection, or Event Hubs event. Up to five action groups can serve one alert rule, and many rules can reuse a group.
On AWS, an alarm commonly publishes to an Amazon SNS topic. Subscribers can be email recipients, phone numbers, HTTPS endpoints, Lambda functions, or SQS queues. Other alarm actions include EC2 stop, terminate, reboot, or recover; Auto Scaling; and Systems Manager work items.
Route a Sev1 "site unavailable" condition to the on-call engineer through SMS and push, with a Logic App posting to the team channel. Route a Sev3 "disk usage growing" trend to email and a ticket. The first route needs an immediate responder; the second needs an owner who can schedule work. Sending everything to everyone hides responsibility and creates alert fatigue.
Automate a known response
A runbook can restart a stuck service. An EC2 alarm on StatusCheckFailed_System can request instance recovery onto healthy hardware. Record and notify about automatic fixes so repeated failures remain visible. A successful restart can restore service while leaving the underlying cause unresolved.
Composite CloudWatch alarms combine alarm states. A rule such as ALARM(HighLatency) AND ALARM(HighErrorRate) notifies only when both conditions hold. Put the notification on the composite and remove duplicate child notifications when the combined condition is the intended incident signal. Composite alarms can send SNS notifications or create work items, but cannot directly run EC2 or Auto Scaling actions.
Suppress delivery during maintenance
Azure alert processing rules work after alerts fire. A rule can suppress action groups during a Saturday 01:00–03:00 maintenance window or add an action group across a subscription. The underlying alerts still fire and remain recorded. In CloudWatch, disable alarm actions during maintenance and enable them again afterward. Suppressing delivery does not repair the monitored fault.
Test the complete route
Use the Azure action group Test function and confirm what actually arrived. Direct email receivers need one-time-passcode verification; ARM role email receivers do not. Channel availability differs by country, and Azure rate limits can affect a burst of email, SMS, push, or voice notifications.
CloudWatch set-alarm-state changes the state temporarily until normal evaluation resumes. Use it to test the action path, then exercise the metric condition separately. CloudWatch does not validate the existence of an alarm's action target, so a deleted SNS topic can leave a rule silently disconnected. Confirm subscriptions, endpoint permissions, responder ownership, and recovery notifications. A dashboard or a shared mailbox that nobody watches cannot replace a tested route.
Key Takeaways
- Reuse action groups or SNS topics with a named response owner.
- Route urgent service failures differently from slow trends.
- Processing rules suppress delivery while alert records remain available.
- Test receipt at the destination, including receiver verification and permissions.
- Keep automated fixes visible and preserve recovery notifications.
3Protect data with backups
Backup work starts with two questions: how much recent data can be lost, and how quickly must the service return? Turn those needs into schedules, retention, vault choices, and restore procedures. Then protect the recovery points from deletion and protect the keys needed to read them. A completed backup job is only one part of the evidence. A restore test must also show that the application and its dependencies work within the recovery time objective.
3.1 Set up backup vaults and policies
A backup preserves a point-in-time copy so you can return to an earlier state after deletion, corruption, or ransomware. Each restorable state is a recovery point. A policy defines when points are created and how long they remain. A vault provides the storage container and its access, encryption, and redundancy settings.
Match the vault to the workload
| Service | Main role |
|---|---|
| Azure Recovery Services vault | Azure VMs, SQL Server and SAP HANA in VMs, Azure Files, and supported on-premises protection; also Site Recovery |
| Azure Backup vault | Newer protection scenarios such as Azure Disks, Blobs, PostgreSQL, and AKS |
| AWS Backup vault | Recovery points selected by backup plans and resource assignments |
Choose Azure vault storage redundancy before protecting items: locally redundant, zone-redundant, or geo-redundant as supported. AWS Backup plans contain rules for schedules, start and completion windows, destination vaults, lifecycle, retention, and copies. The default windows allow a job to start within 8 hours and finish within 7 days. An assignment can select resource IDs or tags such as backup=daily, allowing newly tagged resources to join protection.
Work backward from the RPO
The recovery point objective, or RPO, limits acceptable data loss measured in time. A daily backup can lose almost 24 hours of changes if failure occurs just before the next point. For an order database with a four-hour RPO, choose a schedule with recovery points no more than four hours apart and monitor whether jobs actually produce them on time.
Azure Standard VM policies run daily or weekly and keep instant restore snapshots for 1–5 days. Enhanced policies support 4-, 6-, 8-, 12-, or 24-hour intervals and up to 30 days of instant restore snapshots; the allowed snapshot retention depends on backup frequency. Premium SSD v2 and Ultra Disk require Enhanced. Trusted Launch can use Enhanced or Standard through supported recent CLI, PowerShell, and REST versions. Enhanced protection cannot be changed back to Standard. Supported AWS services, including RDS, Aurora, and S3, can use continuous backup and point-in-time restore for up to 35 days.
Separate frequency from retention
Frequency controls how recent a recovery point is. Retention controls how far back you can go. A grandfather-father-son scheme might retain 30 daily, 12 weekly, 12 monthly, and 7 yearly points: at most 61 points before overlaps. Seven years of daily points would require 2,555 points. The shorter recent intervals preserve fine recovery choices; the older intervals preserve long-term milestones.
For supported AWS cold backups, the minimum stay is 90 days. Moving a point on day 30 requires deletion on day 120 or later. Day 100 would leave only 70 cold days and is invalid. Azure can archive eligible long-term monthly or yearly points.
Keep a copy outside the source region and, for high-value data, outside its account. AWS copy rules support both forms of separation. Azure geo-redundant Recovery Services storage with Cross Region Restore permits restoration in the paired region, including during drills. Replication quickly propagates changes, including harmful ones; backups preserve older choices. Same-account, same-region snapshots retain shared failure risks.
Key Takeaways
- Choose the vault type from the protected workload.
- Set backup frequency from RPO and retention from how far back recovery must reach.
- Monitor successful recovery-point times as well as the configured schedule.
- Keep supported AWS cold points for at least 90 days after transition.
- Keep geographically separate copies and isolate critical copies administratively.
- Retain historical recovery points alongside replication.
3.2 Secure backups against deletion and ransomware
Backups are valuable targets. An attacker with production administrator access may delete recovery points or shorten retention before damaging live data. Protect the backup system through independent layers so one compromised credential cannot remove every way back.
Delay deletion and block early removal
Azure Backup soft delete keeps deleted backup data recoverable. Its default retention is 14 days at no extra cost; extending it to as much as 180 days adds normal charges beyond day 14. Recovery Services vault soft delete is enforced. Undeleting an item returns it to "Stop protection with retain data," after which you can restore or resume protection. Soft delete also covers supported recovery points removed by policy-retention changes.
An Azure immutable vault blocks operations that delete points or reduce their retention before expiry. Enabled but unlocked immutability can be turned off; locking it makes that decision irreversible. Multi-user authorization adds a Resource Guard controlled by a different team. Critical operations then require permissions beyond those held by the vault's usual operator.
AWS Backup Vault Lock provides write-once, read-many protection. Governance mode allows an authorized IAM user to remove the lock. Compliance mode becomes irreversible after its grace period, which is at least three days. After that, even the root user or AWS cannot remove the lock or delete protected points before expiry. Minimum and maximum retention settings constrain new backup and copy jobs.
Consider a compliance lock with a three-day grace period and an allowed retention of 7–400 days. A one-day backup job fails the retention rule; a 35-day job fits. Validate the configuration before the grace period ends. A point retained forever under an irreversible lock has no future expiry that will release its storage cost.
Separate access and preserve keys
Let backup operators start backups and restores without granting deletion rights. Vault policies can deny backup:DeleteRecoveryPoint, and an isolated backup account can exclude production administrators. Azure Backup Operator and Backup Reader roles give narrower access than broad administrator roles. Separation matters most when the same person could otherwise change production, backups, and their safeguards.
Azure encrypts backup data with Microsoft-managed keys by default and supports customer-managed keys in Key Vault. AWS encryption depends on the resource: fully managed S3 and EFS backups use the vault key, while EBS and RDS points inherit source encryption and can be unencrypted. Encrypt sources and verify the resulting recovery points. For EBS cross-region copies, verify destination-vault encryption and compatible keys. Copies of unencrypted Aurora clusters remain unencrypted, so a copy alone does not solve encryption for every resource type.
An encrypted point is unusable if its key is disabled or deleted. Protect Azure keys with soft delete and purge protection. AWS KMS deletion has a 7–30 day waiting period during which cancellation is possible. Include key access in restore tests.
Check the whole protection design
The 3-2-1 rule counts three data copies including production, two kinds of storage, and one geographically separate copy. A separate account adds administrative isolation; it does not supply geographic distance by itself. Add an immutable copy for protection against privileged deletion. Monitor failed jobs, deleted items, retention changes, and lock changes through Azure Monitor or AWS job events and notification routes.
Key Takeaways
- Soft delete delays permanent deletion; locked immutability prevents early removal.
- Validate compliance-lock retention before the irreversible grace period ends.
- Keep deletion rights and backup-account access separate from production administration.
- Check encryption by resource type and protect every key needed for a restore.
- Use geographic separation and administrative isolation to cover different risks.
- Alert on changes to backup protection as well as failed backup jobs.
3.3 Restore data and test backups
A recovery point is useful when you can restore the required data and make the service work again. Test that full path regularly, including permissions, encryption keys, configuration, and the network. The restore job's completion time and the service's recovery time can be different.
Choose a clean point and the right restore action
After accidental deletion, select a point before the deletion. After ransomware or a bad deployment, investigate when damage started; the newest backup may already contain it. An application-consistent point captures data after the application flushes pending work, using mechanisms such as Windows Volume Shadow Copy Service or backup scripts. A crash-consistent point resembles the disks after a sudden power loss and can require application recovery on startup.
Azure VM restoration can create a new VM, restore disks for attachment or reconstruction, replace an existing VM's disks, or mount a point for file-level recovery. Choose file-level recovery for a few missing files when the rest of the VM is sound. Use a new VM or separate disks when investigating a damaged system. Instant restore snapshots support faster access than a point that must be retrieved from the vault tier. Cross Region Restore uses the paired region with a suitable geo-redundant vault.
AWS restoration usually creates a new resource, such as an EBS volume, EC2 instance, or RDS database. Point-in-time recovery selects a moment within continuous-backup retention. Connect the restored resource into the application after validation. Scheduled AWS Backup restore testing can create a resource, allow validation, and clean it up afterward.
Run an isolated restore test
- Choose the recovery point and record what data should be present.
- Restore to a separate subnet, resource group, or account with the required permissions and capacity.
- Supply keys, secrets, certificates, configuration, and dependent services.
- Check data integrity and application behavior, including a representative transaction.
- Record the full elapsed time and remove the test resources.
Isolation prevents duplicate queue processing, conflicting addresses, and accidental overwriting of healthy production data. Target quotas, firewall rules, DNS, and operator access belong in the runbook because a recovered disk alone does not provide them.
Compare the result with the RTO
The recovery time objective, or RTO, limits how long service can remain unavailable. Suppose the target is two hours. A restore test starts at 09:00, the VM runs at 09:50, and application checks finish at 10:20. The tested recovery takes 80 minutes, leaving 40 minutes within the target. Reporting 50 minutes would omit the work that made the application usable.
A 150-minute result would show that the data is recoverable but the two-hour objective is missed. Identify the slow stage and test a faster path, such as keeping instant restore snapshots or using site recovery when the required recovery time demands it.
Between tests, monitor job results and recovery-point age. Azure Backup reports use diagnostic settings and Log Analytics to show trends in success and storage. AWS Backup exposes job status and events; Audit Manager checks controls such as protected-resource coverage, frequency, and retention. A successful job record supports the audit, while an application restore test supplies evidence that the point can actually be used.
Key Takeaways
- Select a recovery point from before the damage began.
- Match file, disk, VM, or point-in-time restoration to the recovery task.
- Test in isolation with keys, permissions, networking, and dependencies.
- Measure through successful application checks when judging RTO.
4Recover workloads in another region
Regional recovery depends on more than having a second copy of each disk. The target needs networks, permissions, keys, capacity, and an order for starting dependent services. Continuous replication supplies recent data, while drills show whether the complete application can serve users elsewhere. Practice the route through failover, traffic switching, and return to the primary region, and measure the data age and service downtime from their correct starting points.
4.1 Replicate workloads for site recovery
Site recovery continuously copies server changes to another region so recovery machines can start from a recent state. It supports shorter data-loss and downtime targets than restoring an older backup. Keep backups as well: replication can carry corruption and deletions into the recovery copy.
Prepare Azure replication and the target
Azure Site Recovery protects VMs through a Recovery Services vault in a region other than the source, usually the target region. Source disk changes flow continuously to the target. Crash-consistent points are created every five minutes. The replication policy controls recovery-point retention, one day by default, and application-consistent point frequency, which is off by default.
Define the target resource group, virtual network, subnet, VM sizes, availability arrangement, and public addresses. Network mapping connects source networks to the intended target networks. Check quotas and launch capacity before a drill. A VM-size setting describes what to request; a capacity reservation provides capacity assurance where supported.
A recovery plan groups machines in startup order and adds runbooks, scripts, or manual checks. For a three-tier application, start database VMs first, application servers second, and web servers third. Then update traffic routing and verify a transaction. Starting every machine together can leave application services failing while the database is still recovering.
Understand the AWS staging approach
AWS Elastic Disaster Recovery, or AWS DRS, uses an agent on each source server to replicate changed blocks to a staging subnet in the target region. The staging area uses small replication servers and lower-cost storage. Launch settings describe the recovery instances, and retained point-in-time snapshots permit recovery from an earlier state. Source servers can be on premises, in another cloud, or in another AWS region. The service is designed for recovery points measured in seconds and recovery launches in minutes; the achieved result depends on the complete recovery path.
Replicated data with recovery compute started when needed follows a pilot-light pattern. Warm standby keeps a smaller application running to reduce startup work. Multi-site active/active serves traffic from several regions, so the survivors need spare capacity or a tested scale-out path to absorb traffic after a region fails. These choices trade ongoing cost for recovery speed.
Include what the VMs depend on
Managed services need their own recovery arrangements: database geo-replication, cross-region replicas, S3 replication, or Azure Storage redundancy as appropriate. Neither Site Recovery nor AWS DRS automatically converts every managed application dependency into a recoverable server.
List DNS, identity, secrets, certificates, keys, firewall rules, and operator access in the recovery plan. A server can boot successfully while its application cannot authenticate or decrypt data. Track replicated-storage cost as part of the standing recovery environment.
Monitor replication health, recovery-point age, lag, and backlog. If the latest usable point is an hour old, the available data is an hour behind, even when the design target says five minutes. Investigate that gap before the next incident; a healthy-looking target network cannot compensate for stale replicated data.
Key Takeaways
- Prepare target networks, sizes, quotas, and capacity before failover.
- Use recovery-plan groups to start dependent services in order.
- Include managed services, identity, keys, and traffic routing in the recovery design.
- Monitor the age of usable recovery data against the RPO.
- Keep historical backups because replication carries harmful changes too.
4.2 Run failover drills and real failovers
A test failover starts recovery copies in an isolated target network while production and replication continue. A planned failover shuts down the source and synchronizes final changes before switching. An unplanned failover uses available points after the source has already failed and can lose changes newer than the chosen point.
Rehearse with a useful recovery point
Azure offers several choices. Latest processed uses the newest point already processed, reducing recovery delay. Latest processes all received data first, reducing potential data loss but adding time. Latest app-consistent uses the newest application-consistent point. A custom point is available for a single VM failover outside a recovery plan.
For a drill, confirm replication health, choose an isolated non-production network, and run the test for a VM or recovery plan. Check startup, application transactions, and data timestamps. Record the results, then run Cleanup test failover with notes. Cleanup removes test VMs; leaving them running adds cost and can confuse later testing. AWS DRS similarly launches drill instances without stopping replication and requires their termination afterward.
Measure the two objectives separately
Suppose the targets are RTO 60 minutes and RPO 15 minutes. An outage starts at 14:00. The chosen data point is 13:56, the operator starts failover at 14:05, VMs run at 14:22, and the application is verified with traffic switched at 14:41.
- Data age at the outage is 4 minutes, so the achieved RPO is within 15 minutes.
- Service returns 41 minutes after the outage, so the achieved RTO is within 60 minutes.
- The 36 minutes from the operator's action to recovery omits the initial response delay.
Machine boot is an intermediate event. Measure recovery through the point when the application is ready and users can reach it.
Complete failover and restore protection
In Azure, fail over and validate the VMs before commit. Commit removes the other recovery points and fixes the selected recovery state. Next reprotect to replicate from the secondary back toward the primary. Once the primary is healthy, fail over back to it, validate and commit, then reprotect again to restore the original direction. Returning traffic without restoring replication leaves the workload exposed to another outage.
Traffic switching is part of recovery. Route 53 failover routing and Traffic Manager priority routing change DNS answers after health checks detect failure. Cached answers last according to DNS time to live; a short value such as 60 seconds helps clients discover the new address sooner. Azure Front Door proxies HTTP and HTTPS to healthy origins, so clients keep the same address and do not wait for a new DNS answer for origin failover.
AWS DRS recovery launches perform the real recovery; failback replicates recovery-instance changes toward the source and switches service back. Keep a runbook with disaster-declaration criteria, owners, and validation steps. Drill at least yearly, after major changes, and more often for critical services. Include failback in the rehearsal so the return path is as concrete as the outbound one.
Key Takeaways
- Use isolated networks for drills and clean up recovery copies afterward.
- Choose recovery points by the balance between data age, application consistency, and processing time.
- Measure RTO from outage to usable service and RPO from outage to recovered data time.
- Validate, commit, and reprotect in order; repeat protection steps after failback.
- Include traffic redirection and DNS behavior in the recovery timeline.
- Rehearse failback and update the runbook after changes.
5Cut compute costs
Compute savings come from two different changes: using fewer resources and paying less for the resources that remain. Measure the workload through its normal peaks, resize carefully, and stop avoidable running hours first. Then examine the steady hourly baseline for a reservation or savings plan. Purchase flexibility matters when workloads move, and the headline discount matters only when enough matching usage remains to consume the commitment throughout its term.
5.1 Rightsize and schedule compute
Rightsizing matches vCPUs, memory, storage performance, and network capacity to the load with enough headroom for peaks. A low average CPU is a starting clue, not a complete sizing decision. The workload may be limited by memory or a short batch peak.
Measure, choose, and verify
Collect CPU, guest memory, disk, and network measurements across a period that includes month-end and other expected peaks. Inspect high percentiles and maxima, including a nightly job that reaches 95% CPU even when the daily average is low. Select a candidate that meets the workload's performance needs, then compare families and generations. A memory-bound database may benefit from a memory-optimized family; a mostly idle service may suit burstable capacity.
AWS Compute Optimizer analyzes 14 days by default after opt-in, or 93 days with paid enhanced infrastructure metrics. Its EC2 memory recommendations need memory metrics from an agent or supported external tool. Azure Advisor uses 7 days by default, with lookbacks of 7, 14, 21, 30, 60, or 90 days. Its shutdown criteria include p95 maximum CPU below 3%, the three-day p100 of average CPU at or below 2%, and outbound network below 2%. The CPU tests sum use across cores. User-facing resize recommendations target at most 40% CPU and outbound network at p95, and 60% memory at p99. These are recommendation criteria, separate from a team's operational headroom target, often 70–80% CPU. Advisor savings estimates use retail prices and ignore existing commitments.
An 8-vCPU, 32-GiB VM costs $0.40 per hour at an example rate. Its p95 CPU is 18% and peak memory is 10 GiB. A 4-vCPU, 16-GiB candidate costs $0.20 per hour. With unchanged work and proportional CPU scaling, CPU becomes about 36%, while memory becomes 62.5% of capacity. At 730 monthly hours, cost changes from $292 to $146, saving $146 monthly or $1,752 annually. Compare disk and network limits too, and schedule the resize for a maintenance window because changing size can restart the machine. Observe the same workload afterward to confirm the projection.
Remove idle running hours
A test VM needed 12 hours on each of five weekdays runs 60 of 168 weekly hours, about 36% of the week. At an example $0.20 per hour, compute falls from $33.60 to $12 weekly, about 64% fewer compute hours. Azure auto-shutdown or Automation and AWS Instance Scheduler or EventBridge Scheduler support timetables.
Azure Stopped after an operating-system shutdown still incurs compute charges. Stopped (deallocated) releases the compute allocation and ends that charge. A stopped EC2 instance has no instance-hour charge. Persistent disks and chargeable public IP resources can continue costing money while compute is stopped.
Fit purchasing and scaling to the work
Auto Scaling groups and Virtual Machine Scale Sets expand and contract with demand. Containers and serverless services suit spiky execution patterns. Spot capacity suits interruptible batch jobs, build agents, and replaceable workers. AWS advertises up to 90% savings. Stop or terminate interruption warnings are delivered on a best-effort basis two minutes ahead; hibernation begins immediately. Azure Spot evictions can provide up to 30 seconds' notice. Design work to tolerate interruption, and preserve checkpoints where needed.
Check existing reservations before changing family: reducing resource price can lose a discount and raise the effective bill. Finish rightsizing and scheduling before purchasing a long commitment, so unused capacity and idle hours are not built into the purchase.
Key Takeaways
- Use peak-aware CPU, memory, disk, and network data for sizing.
- Check provider recommendations against seasonal demand and existing discounts.
- Project resource use on the candidate, then verify it after resizing.
- Deallocate Azure VMs to stop compute billing; check persistent-resource charges separately.
- Use scheduling and scaling to remove avoidable compute hours.
- Choose Spot only for work that can tolerate interruptions.
- Rightsize and schedule before buying commitments.
5.2 Choose between reservations and savings plans
A commitment discount lowers the rate in return for a one- or three-year promise. It changes billing; it does not create a machine. Matching usage receives the benefit automatically, and the commitment remains payable when that usage stops.
Compare what must stay stable
| Purchase | Main constraint | Flexibility or capacity effect |
|---|---|---|
| AWS Standard Reserved Instance | Matching EC2 configuration | Larger RI discount; limited modifications; Marketplace sale eligibility |
| AWS Convertible Reserved Instance | Matching configuration with exchange rights | Can exchange for other Convertible RIs; smaller discount; no Marketplace sale |
| AWS EC2 Instance Savings Plan | One family in one region | Size, operating system, and tenancy can change |
| AWS Compute Savings Plan | Eligible hourly compute spend | EC2 family and region changes, plus Fargate and Lambda |
| Azure VM reservation | Matching VM reservation and scope | Size flexibility within a supported size group |
| Azure savings plan for compute | Eligible hourly compute spend | Covers supported compute services across regions |
Reserved offerings also cover other services: AWS RDS and several reserved-node services, and Azure SQL Database, Cosmos DB, storage, and backup capacity. AWS and Azure advertise reservation discounts up to 72%; AWS advertises up to 66% for Compute Savings Plans and up to 72% for EC2 Instance Savings Plans. Actual savings depend on the eligible usage, term, and payment arrangement. AWS also offers Database and SageMaker AI Savings Plans; Azure offers database savings plans.
AWS regional RIs apply across availability zones and, for eligible Linux default-tenancy usage, sizes in one family, but reserve no capacity. A zonal RI reserves capacity in its zone. Azure reservation scope can be a resource group, subscription, management group, or shared billing context. Azure VM reservations discount compute, excluding Windows license, disks, and networking; Azure Hybrid Benefit addresses eligible license costs.
Understand hourly spend commitments
A savings plan commits a fixed amount per hour at discounted rates, for example $10 per hour. Matching usage consumes that amount; usage beyond it is charged on-demand. Unused commitment expires at the end of the hour. It cannot pay for a later busy hour. AWS supports All Upfront, Partial Upfront, and No Upfront payment, with larger discounts for All Upfront. Azure reservation monthly payments and upfront payment have the same total cost.
Savings plan terms are fixed after purchase, and Azure savings plans cannot be canceled or refunded. Azure reservation refunds have a USD 50,000 limit in a rolling 12-month window for a billing profile or enrollment. Azure's exchange policy changes on February 1, 2027: new reservations for services supported by savings plans are no longer exchangeable; earlier purchases retain one final exchange. Size flexibility within a VM size group continues.
Choose a configuration-bound purchase for a stable fleet. A move between EC2 families, regions, or into Fargate or Lambda favors Compute Savings Plan flexibility. Leave unpredictable short peaks on-demand or use Spot for interruptible work. Most discount purchases give no capacity guarantee; use a separate capacity reservation when a particular recovery-zone launch must be assured.
Key Takeaways
- A reservation or savings plan is a billing commitment that remains payable when machines stop.
- Match discount flexibility to planned family, region, and service changes.
- Unused hourly savings plan commitment expires each hour.
- Distinguish a discount from a capacity guarantee; zonal RIs reserve capacity.
- Include uncovered license, storage, and network charges in the total.
- Account for the dated Azure exchange rules before relying on exchange rights.
5.3 Size commitments and track their use
Size a commitment from the workload that remains after rightsizing and scheduling. Hourly history reveals the baseline that runs almost all the time. A monthly average can include a daily peak that disappears overnight, leaving an oversized commitment unused.
Calculate the steady hourly purchase
Review 30–60 days of hourly eligible usage in Cost Explorer or Azure Cost Management, including planned migrations and retirements. Express a savings plan purchase at the discounted rate. If ten steady instances each cost an example $0.20 per hour on-demand, their combined hourly price is $2. With a 30% discount, the commitment is $1.40 per hour.
Across 8,760 annual hours, that baseline costs $12,264 instead of $17,520, a $5,256 saving. Suppose six extra instances run eight hours daily. Their on-demand peak cost is $3,504 annually. Combining the baseline plan and peak usage gives $15,768 annually, compared with $21,024 entirely on-demand.
Buying for all sixteen instances commits $2.24 every hour. For sixteen hours daily, $0.84 goes unused. Annual unused commitment is $4,905.60, and the total plan charge is $19,622.40. The peak-sized purchase saves only $1,401.60 against all on-demand. A larger percentage of usage covered does not ensure a larger cash saving.
Check break-even before buying
For a reservation with discount , the full-term price is the on-demand hourly rate multiplied by and every hour of the term. Compare it with the hours the resource would actually run on-demand. At a 40% discount, usage must exceed 60% of the term to save money. In a non-leap year, that is more than 5,256 of 8,760 hours. Equality gives the same cost.
A scheduled VM running nine hours on five weekdays uses 45 of 168 weekly hours, about 27%. A 40% reservation discount cannot overcome paying for the remaining idle hours. Use the planned schedule in this comparison, not the machine's former always-on schedule.
Read utilization and coverage separately
Utilization measures how much purchased commitment was used. A $1.40 hourly plan with $1.33 average consumption has 95% utilization. Low utilization means paid commitment lacks matching usage; check scope, family eligibility, and changes in demand before adding purchases.
Coverage measures the share of eligible usage covered by commitments, using a consistent cost basis. The baseline in the sixteen-instance example represents $17,520 of $21,024 annual on-demand-equivalent spend, about 83%. Uncovered short peaks can be intentional. Buy more only when the uncovered usage is a dependable baseline.
Cost Explorer recommendations use 7-, 30-, or 60-day histories; Azure recommendation tools also look backward. Adjust them for upcoming changes. Review utilization and coverage monthly, alert on poor use, and spread purchases over time when staggered expiry helps adjustment. AWS Budgets supports RI and Savings Plans utilization and coverage alerts; Azure supports reservation utilization alerts. At expiry, matching usage returns to on-demand rates unless another benefit applies.
Key Takeaways
- Base purchases on optimized hourly baseline usage and known future changes.
- State savings plan commitments at discounted hourly rates.
- Compare unused commitment with the full on-demand alternative.
- Break-even depends on actual running hours across the entire term.
- Utilization measures use of the purchase; coverage measures how much eligible usage receives benefits.
6Cut storage costs with tiering and cleanup
Storage savings depend on the whole life of the data: how often it is read, how quickly it must return, how long it must remain, and when it can be deleted. Cooler tiers reduce storage rates but can add access costs, waiting time, and minimum-duration charges. Lifecycle rules make these choices repeatable. Alongside tiering, review disks, snapshots, addresses, versions, and logs that keep charging after their original workload has gone.
6.1 Choose storage tiers and lifecycle rules
A storage tier trades a lower storage rate for access charges, minimum duration, or retrieval delay. Start with the data's access pattern and recovery deadline. The cheapest GB-month rate can be expensive for data scanned every day.
Match the class to access and resilience
| Object tier or class | Minimum stay | Access behavior |
|---|---|---|
| S3 Standard | None | Immediate access for active data |
| S3 Standard-IA / One Zone-IA | 30 days | Immediate access with retrieval fees; 128 KB minimum billable size |
| S3 Glacier Instant Retrieval | 90 days | Millisecond access |
| S3 Glacier Flexible Retrieval | 90 days | Restore before access, typically minutes to hours |
| S3 Glacier Deep Archive | 180 days | Restore before access, with hours of waiting |
| Azure hot / cool / cold | None / 30 / 90 days | Online access; cooler tiers have higher access costs |
| Azure archive | 180 days | Offline until rehydrated; standard rehydration can take up to 15 hours |
The Azure cool and cold minimums apply to general-purpose v2 accounts; legacy Blob Storage accounts have different minimum-duration rules. S3 One Zone-IA stores data in one availability zone, so choose it only for data you can re-create. Azure archive is unavailable with ZRS, GZRS, or RA-GZRS and cannot be the account default. The default can be hot, cool, or cold.
S3 Intelligent-Tiering suits changing or unknown access: it moves eligible objects to Infrequent Access after 30 days without reads and Archive Instant Access after 90 days, returning read objects to Frequent Access. Optional archive tiers add delayed access. A per-object monitoring fee replaces retrieval fees; objects below 128 KB remain unmonitored in Frequent Access.
Write the lifecycle from actual ages
S3 rules select objects by prefix, tags, or size, then transition or expire them by age. Standard-IA and One Zone-IA transitions require at least 30 days since creation. Versioned buckets need separate noncurrent-version rules, and incomplete multipart uploads need an abort rule. Azure lifecycle policies filter by blob type, prefix, or tags and act on creation, modification, or tracked last-access age. They can manage snapshots and prior versions, but cannot rehydrate archived blobs; use Set Blob Tier or Copy Blob.
For 100 GB of logs daily kept 365 days, move to cool at day 30 and archive at day 90. At steady state, 3,000 GB is hot, 6,000 GB cool, and 27,500 GB archived. At example monthly rates of $0.020, $0.010, and $0.002 per GB, these portions cost $60, $60, and $55: $175 monthly. All 36,500 GB kept hot would cost $730. The $555 storage saving, about 76%, excludes transaction, retrieval, and transfer costs. Archived objects remain there 275 days, beyond the 180-day minimum.
Deleting an Azure archive blob after only 100 archived days leaves 80 days of minimum-duration charges. A Standard-IA object deleted after ten days is still billed for its 30-day minimum. A 40 KB Standard-IA object is billed as 128 KB, or 3.2 times its size. Check duration and object size before bulk transitions.
For block storage, compare capacity, IOPS, and throughput. EBS gp3 lets you size performance separately from GB and can cost less than gp2. Azure disk classes offer different performance-price choices. EBS Snapshots Archive has a 90-day minimum and can take up to 72 hours to restore, so include that delay in recovery planning.
Key Takeaways
- Choose tiers from access frequency, retrieval deadline, size, and minimum duration.
- Keep re-creatable data only in single-zone classes.
- Include retrieval and transaction charges when comparing total cost.
- Use separate lifecycle actions for current objects, older versions, and incomplete uploads.
- Plan archive rehydration explicitly; Azure lifecycle cannot perform it.
- Check disk performance requirements as well as storage capacity.
6.2 Find and remove unused resources and data
Unused resources can keep charging after their workload disappears. Common candidates include unattached disks, old images and snapshots, idle public addresses, forgotten test systems, old object versions, incomplete uploads, indefinite logs, and backups beyond required retention.
Find candidates with resource and billing evidence
Azure Advisor and Cost Management reveal recurring cost; Resource Graph can find managed disks with diskState equal to Unattached. On AWS, combine Trusted Advisor, Compute Optimizer idle recommendations, and Cost Explorer. This command lists unattached EBS volumes:
aws ec2 describe-volumes --filters Name=status,Values=available
A resource-state query identifies candidates, while ownership and operational history determine whether deletion is appropriate. A disk may be waiting for a VM rebuild; a quiet replica may protect disaster recovery.
For example, 25 unattached 128 GB disks at an example $0.08 per GB-month cost $256 monthly or $3,072 annually. Twenty idle AWS public IPv4 addresses at $0.005 per address-hour cost $73 across 730 hours. Public IPv4 charges can also apply when addresses are attached, so attachment alone is not the measure of waste; useful service is.
Use an owned cleanup process
- Identify the resource and its ongoing charge.
- Find the owner from tags, Azure activity history, or CloudTrail.
- Notify the owner and record a planned deletion date.
- Preserve a recovery snapshot or backup when recovery may still be needed.
- Delete after the agreed grace period and required retention.
- Record the change and compare subsequent billing.
An immutable or locked point stays until expiry. A grace period for team review cannot override locked retention. Retaining an intentional recovery copy is different from leaving its full unused disk running indefinitely.
Stop waste from returning
Review VM deletion settings at creation. Azure can delete linked disks, network interfaces, and public IP resources with the VM. EC2 root EBS volumes normally have DeleteOnTermination enabled. Data-volume behavior depends on how the volume was attached and its block-device mapping; inspect the actual flag instead of assuming that every non-root volume survives or disappears.
EBS snapshots are incremental. Deleting one removes only blocks no other snapshot needs, so its displayed size overstates the savings available from deleting it. Deregister an AMI before removing snapshots it references. Use Data Lifecycle Manager or managed backup retention to keep snapshot cleanup repeatable.
For S3, expire noncurrent versions separately from current objects; for example, remove versions older than thirty days while keeping the three newest noncurrent versions. Abort old incomplete multipart uploads, for example after seven days. In Azure, lifecycle rules can remove versions and snapshots; soft-deleted blobs remain billed through their retention period. A current-object expiration rule alone can leave much of the stored data untouched.
Set CloudWatch Logs retention explicitly because the default keeps data indefinitely. Compare backup retention with the actual requirement: 365 daily points versus 35 daily points is about ten times as many points, although deduplication and changed-data size affect bytes and cost. Review retired-system backups after required retention expires. Repeat waste reviews monthly, tracking unattached GB and unused-address counts, and confirm realized savings in the bill.
Key Takeaways
- Confirm ownership and recovery purpose before deleting idle-looking resources.
- Preserve needed recovery data and honor locked retention.
- Inspect deletion flags and prevent new orphaned resources.
- Incremental snapshot size is not the same as removable billed data.
- Clean versions, incomplete uploads, logs, and expired backups with separate rules.
- Confirm savings through recurring resource reports and billing.
Cloud Monitoring examples
1Investigate a slow cloud service
12 steps
- 1IntroductionStart with the symptom
Users report a slow order service, but its five-minute CPU chart looks ordinary. Before changing capacity, ask what that chart actually shows.
A metric summarizes numeric behavior over time. Logs retain individual events that can explain it. Work through the measurement first, then decide which guest data and event records are needed to investigate the slowdown.
- 2ExplanationIdentify the series
In CloudWatch, select the
AWS/EC2namespace,CPUUtilizationmetric, and the intendedInstanceId. The dimension keeps the chart tied to one instance.Check the same resource and time range when comparing charts. An overall fleet view can hide one overloaded machine, just as an unfiltered storage-transaction total can hide throttling among successful requests.
- 3ExampleRead the five samples
The instance reports five one-minute CPU values: 20%, 22%, 25%, 21%, and 95%. A five-minute Average chart combines them into one point.
Add the five readings to get 183, then divide by five to get 36.6%. The maximum is 95%. The ordinary-looking average does not show how close the instance came to full CPU during the busiest minute.
- 4ChallengeChoose evidence for a brief spike
A different VM has a moderate 15-minute CPU average, but requests stall for about one minute. What chart change would help test whether brief CPU peaks coincide with the stalls?
---reveal---
Use a shorter period and inspect Maximum for the same VM and incident time. The long-period average blends the busy minute with quiet minutes. Check timing alongside request symptoms before deciding whether CPU explains the incident.
- 5TipCollect the missing memory data
CPU headroom does not establish memory headroom. Standard EC2 charts do not supply guest memory use.
Configure the CloudWatch agent to collect it. On Azure, guest counters use Azure Monitor Agent and a data collection rule. Confirm that the series arrives before relying on it for diagnosis or sizing; a blank chart can mean absent collection, permissions trouble, or an incorrect query scope.
- 6ExplanationChoose the log source
The team next asks whether a deployment or a resource change preceded the slowdown. Use control-plane logs for administrative changes: CloudTrail or Azure activity log.
To investigate failed requests, collect resource or application events. Azure resource logs need diagnostic settings; guest files need an agent. An incident that occurred before collection was enabled cannot be reconstructed from resource logs that were never recorded.
- 7ExampleBuild the heartbeat result
To find stale Azure agents, start with
Heartbeatand summarizemax(TimeGenerated)byComputer, naming the resultLastSeen.Each output row now contains one computer and its latest heartbeat time. Multiple earlier reports from that computer no longer produce separate rows. This first stage answers when each represented agent last reported; it does not yet decide which report is too old.
- 8ExampleKeep only stale agents
Continue the query with
where LastSeen < ago(15m). Now only represented computers whose latest heartbeat is older than fifteen minutes remain.Compare those identities with the expected inventory too. A machine with no heartbeat anywhere in the queried history cannot produce a grouped row. The stale-result list and the missing-inventory list reveal different collection gaps.
- 9ChallengeFilter before losing the field
A query must count error rows by
Computer. It first summarizes all rows byComputer, then tries to filter the originalLevelfield for errors. How should the query change?---reveal---
Filter
Levelbefore summarizing, then count the surviving rows byComputer. The aggregation has removed the original field, so it cannot support that later filter. Filtering early also reduces the data passed into the aggregation. - 10ConnectionKeep investigation data without endless growth
A VM sending 2 GB of logs daily adds about 60 GB over thirty days. Keep useful warning and error evidence, and remove debug detail that no operational task needs.
Set source retention as well as archive lifecycle. Exporting a CloudWatch log group to S3 leaves the original in CloudWatch Logs. Without source expiry, the team pays to grow both copies even after choosing S3 for long-term keeping.
- 11ChallengeChoose collection before the next incident
An EC2 service has no guest memory series, and its application log file stays only on the VM. What collection change would make a later slowdown easier to investigate after the VM is replaced?
---reveal---
Configure the CloudWatch agent to publish memory metrics and send the application file to CloudWatch Logs. Confirm both streams arrive and set log retention. The metrics expose capacity pressure; the stored log events preserve detail beyond the original VM's life.
- 12RecapKeep the evidence chain intact
For the slow service, the useful chain is specific: identify the instance, inspect peaks at a suitable period, collect guest memory, and query the relevant events.
Two checks guide the next investigation: whether the data was collected at the time, and whether the query still represents every resource you expected to inspect. Keep retention long enough for those investigations without leaving unused detail to grow indefinitely.
2Build and test an actionable alert
12 steps
Save this lesson to follow every Walkthrough step by step.
- 1IntroductionConnect detection to response
- 2ExplanationDefine the condition before its message
- 3ExampleEvaluate each period
- 4ChallengeApply the rule to fresh data
- 5Key InsightDecide what silence means
- 6TipKeep acknowledgment separate
- 7ExplanationAssign an owner and a route
- 8ExampleUse a combined incident signal
- 9ChallengeKeep maintenance evidence
- 10TipTest the destination
- 11ChallengeDiagnose a quiet receiver
- 12RecapVerify both parts before relying on them
3Build protection you can restore
15 steps
Save this lesson to follow every Walkthrough step by step.
- 1IntroductionWork from recovery needs
- 2ExplanationChoose the vault from the workload
- 3ExampleTurn the four-hour RPO into a schedule
- 4ExampleKeep useful historical intervals
- 5ChallengeFit the cold-retention rule
- 6ConnectionProtect the historical copies
- 7ExampleCheck retention before locking
- 8ChallengeDistinguish account isolation from distance
- 9TipKeep decryption available
- 10ExplanationChoose the clean recovery state
- 11ExampleChoose the smallest useful restore
- 12ExampleTime the whole restore
- 13ChallengeInclude the missing dependency
- 14ChallengeConnect point age and recovery speed
- 15RecapKeep protection measurable
4Rehearse regional recovery and return
13 steps
Save this lesson to follow every Walkthrough step by step.
- 1IntroductionRecover the application in another region
- 2ExplanationPrepare replication and target resources
- 3ExampleStart the three tiers in order
- 4ChallengeCheck what replication has not supplied
- 5Key InsightCheck actual data freshness
- 6ExplanationRun a drill without touching live processing
- 7ExampleChoose between processing time and data age
- 8ExampleMeasure the drill from the outage
- 9ChallengeJudge a different outcome
- 10ConnectionMove users to the recovered endpoint
- 11ExplanationCommit and establish reverse replication
- 12ChallengeCheck the return path before switching
- 13RecapLeave the workload protected again
5Optimize compute before making a commitment
16 steps
Save this lesson to follow every Walkthrough step by step.
- 1IntroductionSeparate less usage from a lower rate
- 2ExplanationGather a representative workload
- 3ExampleProject CPU on the smaller VM
- 4ExampleCheck memory and price too
- 5ChallengeChoose a candidate from both limits
- 6TipRemove unused hours before buying
- 7ExplanationChoose the flexibility the future needs
- 8ChallengeMatch a purchase to a migration
- 9Key InsightKeep each hour separate
- 10ExampleCalculate the optimized baseline
- 11ExampleKeep daily peaks outside the purchase
- 12ExampleSee what peak sizing wastes
- 13ExplanationFind the cash break-even
- 14ChallengeSize a new baseline purchase
- 15ChallengeRead the two measures together
- 16RecapVerify savings after the change
6Lower storage cost without slowing required recovery
13 steps
Save this lesson to follow every Walkthrough step by step.
- 1IntroductionPrice the data through its whole life
- 2ExplanationChoose online access or archive
- 3ExampleDivide the retained log history
- 4ExamplePrice each part of the history
- 5ChallengeCheck time spent in the tier
- 6TipCheck small objects and changing reads
- 7ChallengeProtect the recovery deadline
- 8ExplanationFind billed leftovers
- 9ExampleCalculate a disk-cleanup candidate
- 10ChallengeGive the owner a review window
- 11TipClean data beyond current objects
- 12ChallengeExplain why cost did not fall
- 13RecapMake the saving repeatable
Cloud Monitoring practice questions
Set 1: Read signals and choose practical protections10 Practice Questions
Question 1 of 10
Show answerHide answer
Question 2 of 10
Show answerHide answer
Question 3 of 10
Show answerHide answer
Question 4 of 10
Show answerHide answer
Question 5 of 10
Show answerHide answer
Question 6 of 10
Show answerHide answer
Question 7 of 10
Show answerHide answer
Question 8 of 10
Show answerHide answer
Question 9 of 10
Show answerHide answer
Question 10 of 10
Show answerHide answer
Set 2: Apply policies and calculate operating costs10 Practice Questions
Save this lesson to see every answer and practice every set.
Question 1 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 2 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 3 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 4 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 5 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 6 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 7 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 8 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 9 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 10 of 10
Show answerHide answer
Save this lesson to see this answer.
Set 3: Connect monitoring, recovery, and savings10 Practice Questions
Save this lesson to see every answer and practice every set.
Question 1 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 2 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 3 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 4 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 5 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 6 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 7 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 8 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 9 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 10 of 10
Show answerHide answer
Save this lesson to see this answer.
Set 4: Diagnose gaps in operational plans10 Practice Questions
Save this lesson to see every answer and practice every set.
Question 1 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 2 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 3 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 4 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 5 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 6 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 7 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 8 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 9 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 10 of 10
Show answerHide answer
Save this lesson to see this answer.
Set 5: Resolve competing recovery and cost requirements10 Practice Questions
Save this lesson to see every answer and practice every set.
Question 1 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 2 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 3 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 4 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 5 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 6 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 7 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 8 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 9 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 10 of 10
Show answerHide answer
Save this lesson to see this answer.
Stuck on your own question? Homework Help
Key Terms
A
Access tier
Action group
Administrative isolation
Alert processing rule
Alert rule
Application-consistent backup
Auto scaling
B
Backup policy
Backup vault
Break-even utilization
C
Capacity reservation
Cleanup grace period
Commit
Commitment coverage
Commitment utilization
Composite alarm
Compute Savings Plan
Control-plane log
Convertible Reserved Instance
Crash-consistent backup
Cross-region copy
Customer-managed key
D
Deallocation
DeleteOnTermination
Diagnostic setting
Dimension
Dynamic threshold
E
EC2 Instance Savings Plan
Evaluation window
F
Failback
File-level recovery
G
Grandfather-father-son retention
Guest metric
H
Headroom
Hourly commitment
I
Immutability
Incomplete multipart upload
Incremental snapshot
Intelligent-Tiering
K
Kusto Query Language
L
Lifecycle rule
Log Analytics workspace
Log retention
Lookback period
M
M out of N
Metric
Metric retention
Minimum billable object size
Minimum storage duration
Missing-data treatment
notBreaching so healthy intervals with no reported errors stay quiet.Multi-user authorization
N
Namespace
AWS/EC2 before selecting the metric name and the instance dimension.Network mapping
Noncurrent version
O
Orphaned resource
P
Percentile
Planned failover
R
Recovery plan
Recovery point
Recovery point objective
Recovery Services vault
Recovery time objective
Rehydration
Replication lag
Reprotect
Reservation scope
Reserved Instance
Resource log
Restore test
Retrieval fee
Rightsizing
Runbook
S
SNS topic
Soft delete
Spot capacity
Staging area
T
Test failover
Threshold
Time grain
U
Unplanned failover
Usage baseline
V
Vault Lock
About this lesson
Make your own Study Materials
Turn your notes, slides and documents into Study Guides, Practice Questions, Flashcards and 6 more tools.