0

I need to persist all IIS logs automatically in Azure storage, how to enable it?

I see that there are different properties in DiagnosticMonitorConfiguration class, e.g. DiagnosticInfrastructureLogs, Logs, Directories, etc. Which of the above is responsible for the IIS logs? What blob/table are the logs stored to?

Thanks!

Andrew Bezzub
  • 15,744
  • 7
  • 51
  • 73

1 Answers1

1

Under Directory Buffers, you have two options.. IIS Logs and Failed RequestLogs.

Here's a snippet from the diagnostic schema definition that outlines these options:

   <Directories bufferQuotaInMB="1024" 
  scheduledTransferPeriod="PT1M">

  <!-- These three elements specify the special directories 
       that are set up for the log types -->
  <CrashDumps container="wad-crash-dumps" directoryQuotaInMB="256" />
  <FailedRequestLogs container="wad-frq" directoryQuotaInMB="256" />
  <IISLogs container="wad-iis" directoryQuotaInMB="256" />

  <!-- For regular directories the DataSources element is used -->
  <DataSources>
     <DirectoryConfiguration container="wad-panther" directoryQuotaInMB="128">
        <!-- Absolute specifies an absolute path with optional environment expansion -->
        <Absolute expandEnvironment="true" path="%SystemRoot%\system32\sysprep\Panther" />
     </DirectoryConfiguration>
     <DirectoryConfiguration container="wad-custom" directoryQuotaInMB="128">
        <!-- LocalResource specifies a path relative to a local 
             resource defined in the service definition -->
        <LocalResource name="MyLoggingLocalResource" relativePath="logs" />
     </DirectoryConfiguration>
  </DataSources>

SliverNinja - MSFT
  • 31,051
  • 11
  • 110
  • 173
BrentDaCodeMonkey
  • 5,493
  • 20
  • 18
  • You can see the container name in the above entry. That is the blob container for the files. – Tom Apr 11 '12 at 18:46
  • Thanks! Is IISLogs enabled by default, e.g. is it enough to set diagnosticConfiguration.Directories.ScheduledTransferPeriod in code, or do I need to update the config file? – Andrew Bezzub Apr 11 '12 at 20:17
  • Setting it in code will update the above config file. The sample is just a snippet of the xml that's stored in blob storage and leveraged by the Azure Diagnostics agent. – BrentDaCodeMonkey Apr 12 '12 at 12:54