1
votes

I'm using Windows Azure to host my python project and I'm trying to enable the diagnostics without good results.

As I'm using python and not .NET, the only way I can actually configure it is through config files.

Below my config files:

ServiceDefinition.csdef

...
<Imports>
    <Import moduleName="Diagnostics" />
</Imports>
...

ServiceConfiguration.Cloud.cscfg

....
<Setting name="Microsoft.WindowsAzure.Plugins.Diagnostics.ConnectionString" value="DefaultEndpointsProtocol=https;AccountName=<my-account-name>;AccountKey=<my-account-key"/>
....

diagnostics.wadcfg:

<DiagnosticMonitorConfiguration xmlns="http://schemas.microsoft.com/ServiceHosting/2010/10/DiagnosticsConfiguration"
      configurationChangePollInterval="PT10M"
      overallQuotaInMB="1200">

   <DiagnosticInfrastructureLogs bufferQuotaInMB="100"
      scheduledTransferLogLevelFilter="Warning"
      scheduledTransferPeriod="PT5M" />

   <Logs bufferQuotaInMB="200"
      scheduledTransferLogLevelFilter="Warning"
      scheduledTransferPeriod="PT5M" />

   <Directories bufferQuotaInMB="600" 
      scheduledTransferPeriod="PT5M">

      <CrashDumps container="wad-crash-dumps" directoryQuotaInMB="200" />
      <FailedRequestLogs container="wad-frq" directoryQuotaInMB="200" />
      <IISLogs container="wad-iis" directoryQuotaInMB="200" />
   </Directories>
   <WindowsEventLog bufferQuotaInMB="200"
      scheduledTransferLogLevelFilter="Warning"
      scheduledTransferPeriod="PT5M">

      <DataSource name="System!*" />
   </WindowsEventLog>
</DiagnosticMonitorConfiguration>

In Diagnostics Manager, I can't actually see any data.

Thanks.

1

1 Answers

1
votes

May i ask where your diagnostics.wadcfg located? For a regular worker role the diagnostics.wadcfg must be in the root folder and because you don't have worker role module in your project the location of the architecture of your role folder is very important. Be sure to have exact same folder structure in your Python application as a regular worker role and then drop the diagnostics.wadcfg in the role root folder. (add that info back to your question to verify)

Do you see a diagnostics configuration XML is created in your Windows Azure Blob storage which is configured in the *.Diagnostics.ConnectionString. This is a check which suggests that the diagnostics component in the Azure role was able to read the provided configuration and could create the configuration XML at destination blob stroage (same Azure Storage will be use to write log Azure Table storage). Please verify.

Finally your diagnostics.wadcfg need some more work. As this is a non .net worker role you have configured IIS logging (do you really have IIS running in worker role? ) and also have System event log scheduled to transfer "warning only" so if there are no warnings. Finally the log transfer time is set to 5 minutes which is long during test.

What i can suggest as below to test if diagnostics is working or not:

  • Remove the IIS log if you dont have IIS running the Azure VM
  • Replace event log DataSource from System!* to Application!* and set filter to Info level
  • Change the log transfer time to less then a minutes
  • Run the exact same code in Development Fabric with Diagnostics connection string connected to Actual Azure Storage.
  • Add custom event log in your machine and see if they are transferred within the time limit to Azure Table storage and specific tables are created

Above should help you to troubleshoot the problem.