Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Inside Azure Diagnostics (DevLink 2014)

3,758 views

Published on

Discussion of diagnostic/troubleshooting options with the Azure diagnostic agent in Cloud Services.

Published in: Technology
  • Be the first to comment

Inside Azure Diagnostics (DevLink 2014)

  1. 1. Inside Azure Diagnostics
  2. 2. 17 COLUMBUS, OH OCTOBER 17, 2014 CLOUDDEVELOP.ORG
  3. 3. 1. The need for diagnostic data in cloud applications 2. Data we can monitor 3. Using the Azure Diagnostic Agent 4. Real-world guidance for troubleshooting Azure apps
  4. 4. node.js C# Java Agile - vs - Waterfall
  5. 5. Diagnostics Data / Telemetry
  6. 6. Scenario
  7. 7. You’re kidding? Right?
  8. 8. Scenario o o o o o o We have a problem
  9. 9. Resolution 1. Enable Azure diagnostics – Set key performance counters 2. Add logging statements around key functionality – Especially external services 3. Test, test, test 4. Analyze 5. Fix it Scenario o o o o o o
  10. 10. o o o o o o o o
  11. 11. worker roles web roles
  12. 12. worker roles web roles Diagnostic Data – 4x
  13. 13.
  14. 14. Diagnostic Item Table Name Blob Container Name Windows Event Logs WADWindowsEventLogsTable Performance Counters WADPerformanceCountersTable Trace Log Statements WADLogsTable Azure Diagnostic Infrastructure Logs WADDiagnosticInfrastructureLogs Custom Logs (i.e. log4net, NLog, etc.) <custom> IIS Logs WADDirectoriesTable* wad-iis-logfiles IIS Failed Request Logs WADDirectoriesTable* wad-iis-failedreqlogfiles Crash Dumps WADDirectoriesTable* * Location of the blob log file is specified in the Container field and name of the blob in the RelativePath field. The AbsolutePath field contains the name of the file as it existed on the role instance.
  15. 15. 1. Role starts 2. Diagnostic monitor agent starts 3. Diagnostics configured 4. Data buffered locally 5. Data transferred to storage o
  16. 16. o Trace logs o IIS logs o Infrastructure logs o No transfer o OnStart() o Overrides default o diagnostics.wadcfg o Root of worker or bin of web
  17. 17. public override bool OnStart() { // Create the DiagnosticMonitorConfiguration object to use for configuring the monitoring agent. DiagnosticMonitorConfiguration config = DiagnosticMonitor.GetDefaultInitialConfiguration(); // Performance Counter configuration config.PerformanceCounters.DataSources.Add(new PerformanceCounterConfiguration { CounterSpecifier = @"Processor(_Total)% Processor Time", SampleRate = TimeSpan.FromSeconds(30) }); config.PerformanceCounters.ScheduledTransferPeriod = TimeSpan.FromMinutes(1); // Log configuration config.Logs.ScheduledTransferLogLevelFilter = LogLevel.Information; config.Logs.ScheduledTransferPeriod = TimeSpan.FromMinutes(1); // Event Log configuration config.WindowsEventLog.DataSources.Add("Application!*"); config.WindowsEventLog.DataSources.Add("System!*"); config.WindowsEventLog.ScheduledTransferLogLevelFilter = LogLevel.Warning; config.WindowsEventLog.ScheduledTransferPeriod = TimeSpan.FromMinutes(1); // Start the diagnostic monitor with the new configuration DiagnosticMonitor.Start("Microsoft.WindowsAzure.Plugins.Diagnostics.ConnectionString", config); return base.OnStart(); } Impacts local agent only!
  18. 18. Deployment ID
  19. 19. Declarative Configuration using Visual Studio
  20. 20. 1. wad-control-container 2. Imperative code 3. Declarative configuration 4. Default configuration
  21. 21. o o o o o o
  22. 22. Instruct WAD to transfer specific data sources to storage Overwrites current diagnostic configuration http://mcollier.net/DiagOnDemand
  23. 23. Additional host-level data – not DiagnosticAgent.exe
  24. 24. o o o o o
  25. 25. Query Azure Diagnostic Data
  26. 26. o o Vital information o o o o Day-to-day operational data o o o o
  27. 27. Process for Azure hosted solutions is not that different from traditional, on-premises solutions. Compute node resource usage Windows Event logs Database queries response times Application specific exceptions Database connection & cmd failures Microsoft Azure Storage Analytics
  28. 28. o o o o o o
  29. 29. o o o o o o o o o
  30. 30. o o o o
  31. 31. o http://bit.ly/1eomek9 o http://bit.ly/1mVHN3u o http://bit.ly/1k1YkjI o http://bit.ly/Q33mkU o http://bit.ly/1qp4omC
  32. 32. o o o o o o www.JustAzure.com
  33. 33. Questions?

×