SlideShare a Scribd company logo
1 of 26
Reagire agli eventi della
propria infrastruttura con
Azure Monitor
Marco Obinu - @OmegaMadLab
Thanks to
Who am I?
Marco Obinu
@OmegaMadLab
marco.obinu@omegamadlab.com
http://www.omegamadlab.com
https://github.com/OmegaMadLab
https://www.linkedin.com/in/marco-obinu-omegamadlab/
https://www.youtube.com/channel/UCpkBeQSscC1iBvpNP4VNTKQ
• Geek to the bone 
• Azure Solution Architect Expert
Advisory Engineer
SoftJam S.p.A.
AGENDA
• La gestione degli eventi e log in Azure
• Azure Monitor
• Serverless automation
GESTIONE DI EVENTI E LOG IN AZURE
CONCETTI DI BASE
La potenza è nulla senza controllo
Monitoraggio reattivo o proattivo?
Reattivo
Reattivo e proattivo
AZURE MONITOR
COS’È E COME FUNZIONA
Azure Monitor
Alimentazione
Visualizzazione ed analisi
Kusto Query Language cheat sheet
Description SQL Query Azure Monitor log query
Select all data from a table SELECT * FROM dependencies dependencies
Select specific columns from a table SELECT name, resultCode FROM dependencies dependencies
| project name, resultCode
Select 100 records from a table SELECT TOP 100 * FROM dependencies dependencies
| take 100
String comparison: equality SELECT * FROM dependencies WHERE name =
"abcde"
dependencies
| where name == "abcde"
String comparison: substring SELECT * FROM dependencies WHERE name
like "%bcd%"
dependencies
| where name contains "bcd"
SQL  https://docs.microsoft.com/en-us/azure/azure-monitor/log-query/sql-cheatsheet
Splunk  https://docs.microsoft.com/en-us/azure/azure-monitor/log-query/splunk-cheatsheet
Reazione
Alerts
Definizione scope
Soglia su una
metrica, su un
evento o su una
query
Action Group
Common Alert Schema
Hint: usate un servizio come RequestBin! 
{
"schemaId": "azureMonitorCommonAlertSchema",
"data": {
"essentials": {
"alertId": "/subscriptions/<subscription ID>/providers/Microsoft.AlertsManagement/alerts/b9569717-bc32-442f-add5-83a997729330",
"alertRule": "WCUS-R2-Gen2",
"severity": "Sev3",
"signalType": "Metric",
"monitorCondition": "Resolved",
"monitoringService": "Platform",
"alertTargetIDs": [
"/subscriptions/<subscription ID>/resourcegroups/pipelinealertrg/providers/microsoft.compute/virtualmachines/wcus-r2-gen2"
],
"originAlertId": "3f2d4487-b0fc-4125-8bd5-7ad17384221e_PipeLineAlertRG_microsoft.insights_metricAlerts_WCUS-R2-Gen2_-117781227",
"firedDateTime": "2019-03-22T13:58:24.3713213Z",
"resolvedDateTime": "2019-03-22T14:03:16.2246313Z",
"description": "",
"essentialsVersion": "1.0",
"alertContextVersion": "1.0"
},
"alertContext": {
"properties": null,
"conditionType": "SingleResourceMultipleMetricCriteria",
"condition": {
"windowSize": "PT5M",
"allOf": [
{
"metricName": "Percentage CPU",
"metricNamespace": "Microsoft.Compute/virtualMachines",
"operator": "GreaterThan",
"threshold": "25",
"timeAggregation": "Average",
"dimensions": [
{
"name": "ResourceId",
"value": "3efad9dc-3d50-4eac-9c87-8b3fd6f97e4e"
}
],
"metricValue": 7.727
}
]
}
}
}
}
Alert con Azure Function
Alert con Logic App ed Azure Function
Alert con runbook su Hybrid Worker
Scale-up automatico di Azure SQL DB via Azure Function in funzione del consumo % DTU
• Usage and estimated costs:
• A livello di Azure Monitor
• A livello di Workspace  Retention, Daily Cap
• A livello di AppInsight Retention, Data Sampling, Daily Cap
Monitoraggio costi
• Demo
• https://github.com/OmegaMadLab/AzureMonitorDemo
• Documentazione ufficiale
• https://docs.microsoft.com/en-us/azure/azure-monitor/
• RequestBin
• https://requestbin.com/
• DevOps Heroes 2019 – Automazione serverless con Azure Function in
PowerShell
• https://youtu.be/0ZK1SQ6zkiU
• Template per Azure Policy
• https://github.com/tyconsulting/azurepolicy/tree/master/arm-templates/diagnostic-settings
Risorse utili
Thank You!!!
Thanks to

More Related Content

Similar to Azure Day Reloaded 2019 - React to infrastructure events with Azure Monitor

AWS Frederick Meetup 07192016
AWS Frederick Meetup 07192016AWS Frederick Meetup 07192016
AWS Frederick Meetup 07192016
Gaurav "GP" Pal
 

Similar to Azure Day Reloaded 2019 - React to infrastructure events with Azure Monitor (20)

DevOps Tools - Azure Monitor
DevOps Tools - Azure MonitorDevOps Tools - Azure Monitor
DevOps Tools - Azure Monitor
 
Risk Management for Public Cloud Projects
Risk Management for Public Cloud ProjectsRisk Management for Public Cloud Projects
Risk Management for Public Cloud Projects
 
2019-06-04 aOS Strasbourg - Technique 3 - MS Threat Protection - Seyfallah Ta...
2019-06-04 aOS Strasbourg - Technique 3 - MS Threat Protection - Seyfallah Ta...2019-06-04 aOS Strasbourg - Technique 3 - MS Threat Protection - Seyfallah Ta...
2019-06-04 aOS Strasbourg - Technique 3 - MS Threat Protection - Seyfallah Ta...
 
20201015 Azure PaaS Update at Microsoft Ignite 2020
20201015 Azure PaaS Update at Microsoft Ignite 202020201015 Azure PaaS Update at Microsoft Ignite 2020
20201015 Azure PaaS Update at Microsoft Ignite 2020
 
Different monitoring options for cloud native integration solutions
Different monitoring options for cloud native integration solutionsDifferent monitoring options for cloud native integration solutions
Different monitoring options for cloud native integration solutions
 
Azure Incident Response Cheat Sheet.pdf
Azure Incident Response Cheat Sheet.pdfAzure Incident Response Cheat Sheet.pdf
Azure Incident Response Cheat Sheet.pdf
 
Monitoring real-life Azure applications: When to use what and why
Monitoring real-life Azure applications: When to use what and whyMonitoring real-life Azure applications: When to use what and why
Monitoring real-life Azure applications: When to use what and why
 
IT PRO | Connections 2020 : Introduction to Logic Apps and automation solutio...
IT PRO | Connections 2020 : Introduction to Logic Apps and automation solutio...IT PRO | Connections 2020 : Introduction to Logic Apps and automation solutio...
IT PRO | Connections 2020 : Introduction to Logic Apps and automation solutio...
 
NVS_Sentinel
NVS_SentinelNVS_Sentinel
NVS_Sentinel
 
3 module06 monitoring
3 module06 monitoring3 module06 monitoring
3 module06 monitoring
 
Spring boot microservice metrics monitoring
Spring boot   microservice metrics monitoringSpring boot   microservice metrics monitoring
Spring boot microservice metrics monitoring
 
Spring Boot - Microservice Metrics Monitoring
Spring Boot - Microservice Metrics MonitoringSpring Boot - Microservice Metrics Monitoring
Spring Boot - Microservice Metrics Monitoring
 
Cloud Powered Mobile Apps with Azure
Cloud Powered Mobile Apps with AzureCloud Powered Mobile Apps with Azure
Cloud Powered Mobile Apps with Azure
 
Top 13 best security practices for Azure
Top 13 best security practices for AzureTop 13 best security practices for Azure
Top 13 best security practices for Azure
 
Introduction to Azure monitor
Introduction to Azure monitorIntroduction to Azure monitor
Introduction to Azure monitor
 
Stream Processing in SmartNews #jawsdays
Stream Processing in SmartNews #jawsdaysStream Processing in SmartNews #jawsdays
Stream Processing in SmartNews #jawsdays
 
AWS Frederick Meetup 07192016
AWS Frederick Meetup 07192016AWS Frederick Meetup 07192016
AWS Frederick Meetup 07192016
 
Self-Aware Applications: Automatic Production Monitoring (NDC Sydney 2017)
Self-Aware Applications: Automatic Production Monitoring (NDC Sydney 2017)Self-Aware Applications: Automatic Production Monitoring (NDC Sydney 2017)
Self-Aware Applications: Automatic Production Monitoring (NDC Sydney 2017)
 
The Azure Group - Azure Network Watcher
The Azure Group - Azure Network WatcherThe Azure Group - Azure Network Watcher
The Azure Group - Azure Network Watcher
 
SRV408 Deep Dive on AWS IoT
SRV408 Deep Dive on AWS IoTSRV408 Deep Dive on AWS IoT
SRV408 Deep Dive on AWS IoT
 

More from Marco Obinu

More from Marco Obinu (16)

Securing an Azure full-PaaS architecture - Data saturday #0001 Pordenone
Securing an Azure full-PaaS architecture - Data saturday #0001 PordenoneSecuring an Azure full-PaaS architecture - Data saturday #0001 Pordenone
Securing an Azure full-PaaS architecture - Data saturday #0001 Pordenone
 
Implement a disaster recovery solution for your on-prem SQL with Azure? Easy!
Implement a disaster recovery solution for your on-prem SQL with Azure? Easy!Implement a disaster recovery solution for your on-prem SQL with Azure? Easy!
Implement a disaster recovery solution for your on-prem SQL with Azure? Easy!
 
Infrastructure as Code on Azure - Show your Bicep! v0.2 - .NetConf 2020 by Do...
Infrastructure as Code on Azure - Show your Bicep! v0.2 - .NetConf 2020 by Do...Infrastructure as Code on Azure - Show your Bicep! v0.2 - .NetConf 2020 by Do...
Infrastructure as Code on Azure - Show your Bicep! v0.2 - .NetConf 2020 by Do...
 
Infrastructure as Code on Azure: Show your Bicep!
Infrastructure as Code on Azure: Show your Bicep!Infrastructure as Code on Azure: Show your Bicep!
Infrastructure as Code on Azure: Show your Bicep!
 
Sql Start! 2020 - SQL Server Lift & Shift su Azure
Sql Start! 2020 - SQL Server Lift & Shift su AzureSql Start! 2020 - SQL Server Lift & Shift su Azure
Sql Start! 2020 - SQL Server Lift & Shift su Azure
 
SQL Server Lift & Shift on Azure - SQL Saturday 921
SQL Server Lift & Shift on Azure - SQL Saturday 921SQL Server Lift & Shift on Azure - SQL Saturday 921
SQL Server Lift & Shift on Azure - SQL Saturday 921
 
SQL Server Disaster Recovery on Azure - SQL Saturday 921
SQL Server Disaster Recovery on Azure - SQL Saturday 921SQL Server Disaster Recovery on Azure - SQL Saturday 921
SQL Server Disaster Recovery on Azure - SQL Saturday 921
 
Azure VM 101 - HomeGen by CloudGen Verona - Marco Obinu
Azure VM 101 - HomeGen by CloudGen Verona - Marco ObinuAzure VM 101 - HomeGen by CloudGen Verona - Marco Obinu
Azure VM 101 - HomeGen by CloudGen Verona - Marco Obinu
 
Global Azure Virtual 2020 What's new on Azure IaaS for SQL VMs
Global Azure Virtual 2020 What's new on Azure IaaS for SQL VMsGlobal Azure Virtual 2020 What's new on Azure IaaS for SQL VMs
Global Azure Virtual 2020 What's new on Azure IaaS for SQL VMs
 
Azure Day Reloaded 2019 - ARM Template workshop
Azure Day Reloaded 2019 - ARM Template workshopAzure Day Reloaded 2019 - ARM Template workshop
Azure Day Reloaded 2019 - ARM Template workshop
 
Sql Saturday 895 - SQL Server e PowerShell: from Zero to Hero
Sql Saturday 895 - SQL Server e PowerShell: from Zero to HeroSql Saturday 895 - SQL Server e PowerShell: from Zero to Hero
Sql Saturday 895 - SQL Server e PowerShell: from Zero to Hero
 
Automazione serverless con Azure Functions e PowerShell - Marco Obinu - DevOp...
Automazione serverless con Azure Functions e PowerShell - Marco Obinu - DevOp...Automazione serverless con Azure Functions e PowerShell - Marco Obinu - DevOp...
Automazione serverless con Azure Functions e PowerShell - Marco Obinu - DevOp...
 
SQL Saturday 871 - Sardegna 2019 - SQL Server DR on Azure
SQL Saturday 871 - Sardegna 2019 - SQL Server DR on AzureSQL Saturday 871 - Sardegna 2019 - SQL Server DR on Azure
SQL Saturday 871 - Sardegna 2019 - SQL Server DR on Azure
 
SQL Start! 2019 - Ancona - Distribuisci ed amministra le tue istanze SQL Serv...
SQL Start! 2019 - Ancona - Distribuisci ed amministra le tue istanze SQL Serv...SQL Start! 2019 - Ancona - Distribuisci ed amministra le tue istanze SQL Serv...
SQL Start! 2019 - Ancona - Distribuisci ed amministra le tue istanze SQL Serv...
 
Global Azure BootCamp 2019 - Verona - Ottimizzazione delle VM SQL Server su A...
Global Azure BootCamp 2019 - Verona - Ottimizzazione delle VM SQL Server su A...Global Azure BootCamp 2019 - Verona - Ottimizzazione delle VM SQL Server su A...
Global Azure BootCamp 2019 - Verona - Ottimizzazione delle VM SQL Server su A...
 
Global Azure BootCamp 2019 - Verona - Azure Cloud Shell
Global Azure BootCamp 2019 - Verona - Azure Cloud ShellGlobal Azure BootCamp 2019 - Verona - Azure Cloud Shell
Global Azure BootCamp 2019 - Verona - Azure Cloud Shell
 

Recently uploaded

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 

Recently uploaded (20)

DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 

Azure Day Reloaded 2019 - React to infrastructure events with Azure Monitor

  • 1. Reagire agli eventi della propria infrastruttura con Azure Monitor Marco Obinu - @OmegaMadLab
  • 3. Who am I? Marco Obinu @OmegaMadLab marco.obinu@omegamadlab.com http://www.omegamadlab.com https://github.com/OmegaMadLab https://www.linkedin.com/in/marco-obinu-omegamadlab/ https://www.youtube.com/channel/UCpkBeQSscC1iBvpNP4VNTKQ • Geek to the bone  • Azure Solution Architect Expert Advisory Engineer SoftJam S.p.A.
  • 4. AGENDA • La gestione degli eventi e log in Azure • Azure Monitor • Serverless automation
  • 5. GESTIONE DI EVENTI E LOG IN AZURE CONCETTI DI BASE
  • 6. La potenza è nulla senza controllo
  • 7. Monitoraggio reattivo o proattivo? Reattivo Reattivo e proattivo
  • 8. AZURE MONITOR COS’È E COME FUNZIONA
  • 12.
  • 13. Kusto Query Language cheat sheet Description SQL Query Azure Monitor log query Select all data from a table SELECT * FROM dependencies dependencies Select specific columns from a table SELECT name, resultCode FROM dependencies dependencies | project name, resultCode Select 100 records from a table SELECT TOP 100 * FROM dependencies dependencies | take 100 String comparison: equality SELECT * FROM dependencies WHERE name = "abcde" dependencies | where name == "abcde" String comparison: substring SELECT * FROM dependencies WHERE name like "%bcd%" dependencies | where name contains "bcd" SQL  https://docs.microsoft.com/en-us/azure/azure-monitor/log-query/sql-cheatsheet Splunk  https://docs.microsoft.com/en-us/azure/azure-monitor/log-query/splunk-cheatsheet
  • 15. Alerts Definizione scope Soglia su una metrica, su un evento o su una query Action Group
  • 16.
  • 17. Common Alert Schema Hint: usate un servizio come RequestBin!  { "schemaId": "azureMonitorCommonAlertSchema", "data": { "essentials": { "alertId": "/subscriptions/<subscription ID>/providers/Microsoft.AlertsManagement/alerts/b9569717-bc32-442f-add5-83a997729330", "alertRule": "WCUS-R2-Gen2", "severity": "Sev3", "signalType": "Metric", "monitorCondition": "Resolved", "monitoringService": "Platform", "alertTargetIDs": [ "/subscriptions/<subscription ID>/resourcegroups/pipelinealertrg/providers/microsoft.compute/virtualmachines/wcus-r2-gen2" ], "originAlertId": "3f2d4487-b0fc-4125-8bd5-7ad17384221e_PipeLineAlertRG_microsoft.insights_metricAlerts_WCUS-R2-Gen2_-117781227", "firedDateTime": "2019-03-22T13:58:24.3713213Z", "resolvedDateTime": "2019-03-22T14:03:16.2246313Z", "description": "", "essentialsVersion": "1.0", "alertContextVersion": "1.0" }, "alertContext": { "properties": null, "conditionType": "SingleResourceMultipleMetricCriteria", "condition": { "windowSize": "PT5M", "allOf": [ { "metricName": "Percentage CPU", "metricNamespace": "Microsoft.Compute/virtualMachines", "operator": "GreaterThan", "threshold": "25", "timeAggregation": "Average", "dimensions": [ { "name": "ResourceId", "value": "3efad9dc-3d50-4eac-9c87-8b3fd6f97e4e" } ], "metricValue": 7.727 } ] } } } }
  • 18. Alert con Azure Function
  • 19. Alert con Logic App ed Azure Function
  • 20. Alert con runbook su Hybrid Worker
  • 21. Scale-up automatico di Azure SQL DB via Azure Function in funzione del consumo % DTU
  • 22. • Usage and estimated costs: • A livello di Azure Monitor • A livello di Workspace  Retention, Daily Cap • A livello di AppInsight Retention, Data Sampling, Daily Cap Monitoraggio costi
  • 23. • Demo • https://github.com/OmegaMadLab/AzureMonitorDemo • Documentazione ufficiale • https://docs.microsoft.com/en-us/azure/azure-monitor/ • RequestBin • https://requestbin.com/ • DevOps Heroes 2019 – Automazione serverless con Azure Function in PowerShell • https://youtu.be/0ZK1SQ6zkiU • Template per Azure Policy • https://github.com/tyconsulting/azurepolicy/tree/master/arm-templates/diagnostic-settings Risorse utili
  • 24.