1. Azure Monitor #
Metrics, logs and alerts.
Principles #
// KQL : erreurs HTTP par heure (Application Insights)
requests
| where timestamp > ago(24h) and success == false
| summarize erreurs = count() by bin(timestamp, 1h), resultCode
| order by timestamp descaz monitor diagnostic-settings create --name vers-law --resource <id-ressource> \
--workspace <id-log-analytics> --logs '[{"categoryGroup":"allLogs","enabled":true}]' --metrics '[{"category":"AllMetrics","enabled":true}]'
az monitor metrics alert create -g rg-app -n cpu-eleve --scopes <id-vm> --condition "avg Percentage CPU > 80" --action <id-groupe-actions>2. Security #
Defender, Key Vault, activity logs.
Services #
| Service | Role |
|---|---|
| Microsoft Defender for Cloud | Security posture (score), recommendations, workload protection (servers, containers, databases) |
| Key Vault | Secrets, keys and certificates; access through managed identity and RBAC |
| Activity log | Who did what at the control plane level (90 days, to be exported) |
| Microsoft Sentinel | SIEM and SOAR on Log Analytics |
Key Vault #
az keyvault create -g rg-sec -n kv-app-123 --enable-rbac-authorization true
az keyvault secret set --vault-name kv-app-123 -n db-password --value '<secret>'
az role assignment create --assignee <id-identité-managée> --role "Key Vault Secrets User" --scope <id-key-vault>3. Backup and recovery #
Backup and Site Recovery.
Services #
- Azure Backup: Recovery Services or Backup vaults, retention policies, immutability and soft delete.
- Site Recovery: VM replication to another region for disaster recovery.
- Service Health and Advisor: Azure incidents affecting you and recommendations (costs, security, reliability).
Good practice: Export the activity log to Log Analytics: its default retention is only 90 days.
My progress
Sign in to track your progress and take notes. Sign in
💬 Questions about this lesson
No questions yet: be the first to ask for help or share your configuration.
Recommended Articles
Observability on Azure: Azure Monitor, Log Analytics, Application Insights, managed Prometheus and Grafana
A complete overview of observability on Azure: Azure Monitor (metrics, logs and Log Analytics, KQ...
Azure best practices: landing zone, security, reliability and costs
Best practices for running Azure in production: landing zone and management groups, identities an...
Azure networking: VNet, NSG, peering, load balancing and hybrid connectivity
Design networking on Azure: virtual networks and subnets, network security groups (NSG), peering ...
Microsoft Entra ID, RBAC and Azure Policy: identities, permissions and governance
Manage identities and access on Azure: Microsoft Entra ID (users, groups, MFA, conditional access...
Preparing for the Microsoft Azure Fundamentals certification (AZ-900)
Preparation guide for the AZ-900: format, the three domains and their weightings, notions to mast...
Preparing for the Azure Administrator Associate certification (AZ-104)
Preparation guide for the AZ-104: format, the five domains (identities and governance, storage, c...
Compute on Azure: virtual machines, App Service, Functions and containers
Choose and use Azure compute: virtual machines and scale sets (VMSS), App Service, Azure Function...
Databases on Azure: Azure SQL, Cosmos DB, PostgreSQL and cache
Choose a managed database on Azure: Azure SQL Database and Managed Instance, Azure Database for P...
Infrastructure as Code on Azure: Bicep, Terraform, Cost Management and Well-Architected
Describe and deploy Azure as code with Bicep (modules, parameters, what-if, pipeline deployments)...