Logging and Monitoring in the Cloud
Pradeep Kumar C
Support Escalation Engineer
Reason for Diagnostics in Azure
1.
2.
Save diagnostic data that would be lost during a reimaging of the instance
(an Azure Cloud Service is stateless)
Provide a central repository for diagnostics from multiple role instances
Diagnostic Strategy
•
•
Spend time considering a diagnostic strategy for your Azure application i.e. do want to record, errors, deployment status, monitor performance
How will diagnostics setting be changed once deployed?
•
•
Consider cost of logging, both performance wise and financially
How will you access diagnostic information?
•
•
•
•
•
SDK Component provides distributed monitoring
& data Collection
Supports standard diagnostic APIs
Cloud – Friendly
•
Manage Multiple role instances centrally
Scalable
•
Build on Windows Azure Storage & used by scale-out/Scale-in Windows Azure
Platform feature
Developer in control
•
What to Collect & When to collect
DiagnosticMonitorConfiguration
DiagnosticMonitor
"Application!*"
TimeSpan
// add other sources
<DiagnosticInfrastructureLogs bufferQuotaInMB="512" scheduledTransferLogLevelFilter="Verbose" scheduledTransferPeriod="PT1S" />
<Logs bufferQuotaInMB="1024" scheduledTransferLogLevelFilter="Verbose" scheduledTransferPeriod="PT1S" />
<WindowsEventLog bufferQuotaInMB="512" scheduledTransferLogLevelFilter="Verbose" scheduledTransferPeriod="PT5M">
<DataSource name="Application!*" />
</WindowsEventLog>
</DiagnosticMonitorConfiguration>
•
•
•
•
•
•
Imperatively at Start time
Remotely any time via configuration file
Configuration is saved in Storage
Monitor buffers data locally
User can set a quota (FIFO)
Initiates transfer to Azure storage from local buffer
D E M O
•
•
•
•
•
Set up a separate Diagnostic Storage account
Choose only required Diagnostic data
Use an affinity group
Periodically copy and clear the Diagnostic Data from Storage
Be aware of cost of logging, both physical and bandwidth
•
•
•
•
•
Monitoring application performance
CPU and memory usage
Requests to application
•
Troubleshooting and Debugging issues
Errors or exceptions in code
•
Capacity planning
Identify need for more compute resource
•
•
CloudStorageAccount
RoleInstanceDiagnosticManager
CloudStorageAccount …
•
DiagnosticMonitorConfiguration
"Application!*"
•
•
TimeSpan
// add other sources
D E M O
Scenario
Logs no longer or never copied to Azure Storage
• Could be all logs configured
•
• Specific logs
All instances of a role or specific ones
Troubleshooting steps
•
•
•
•
• Check WAD configuration
RDP onto instance to check WAD processes
Locally check WAD configuration
Ensure logs actually exist
Raise a support case
Issue Identified
http://msdn.microsoft.com/en-us/library/windowsazure/hh771389.aspx
http://www.windowsazure.com/en-us/pricing/details/storage/ http://msdn.microsoft.com/en-us/library/gg432992.aspx
http://msdn.microsoft.com/en-us/library/dn205075.aspx
http://msdn.microsoft.com/en-us/library/windowsazure/hh411551.aspx
http://blogs.msdn.com/b/windowsazurestorage/archive/2010/04/17/wi ndows-azure-storage-explorers.aspx
http://msdn.microsoft.com/en-us/library/windowsazure/gg433048.aspx
Visit CIE Blog, Join the Webinar - Windows Azure Diagnostics - Logging and Monitoring in the Cloud on August 6th at 3PM IST (UTC +5:30)