RousselTMLEARNING

Cloud computing

Monitoring and protecting Azure: Monitor, Log Analytics, Defender, Key Vault and Backup

Operate Azure: Azure Monitor (metrics, activity logs, alerts), Log Analytics and KQL, Application Insights, Microsoft Defender for Cloud, Key Vault, Azure Backup and Site Recovery, Service Health and Advisor.

1. Azure Monitor #

Metrics, logs and alerts.

Principles #

Azure Monitor
Diagnostic settings send resource logs to Log Analytics.
// 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 desc
az 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 #

ServiceRole
Microsoft Defender for CloudSecurity posture (score), recommendations, workload protection (servers, containers, databases)
Key VaultSecrets, keys and certificates; access through managed identity and RBAC
Activity logWho did what at the control plane level (90 days, to be exported)
Microsoft SentinelSIEM 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.

Related 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, KQL), Applicat…

Understanding Azure: regions, resource hierarchy, tools and pricing

Microsoft Azure basics: geographies, regions, region pairs and availability zones, the hierarchy of managemen…

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), managed i…

Keep learning

Support us

♥ SUPPORT US

Support RousselTM Learning

Courses, articles, labs and certificates stay free with no intrusive ads. A voluntary contribution, of any amount you choose, pays for hosting, lab environments and new content.

Contribute with PayPal Any amount · card or PayPal accountLearn more
QR code PayPal
Or scan this QR code with your phone

Thank you, every contribution counts!