Autoscaling Application Block Logging
Retired Content |
---|
This content and the technology described is outdated and is no longer being maintained. For more information, see Transient Fault Handling. |
On this page: |
---|
Configuring Logging - Sample Configuration Settings for System Diagnostics Logging, Sample Configuration Settings for Enterprise Library Logging Application Block Logging |
The Autoscaling Application Block logs details of all the activities it performs: collecting data points, evaluating rules, submitting scaling requests to Microsoft Azure, and tracking the success or failure of those scaling requests.
You can specify the logging destination in the block's configuration. For details about how to configure the block, see the topic "Entering Configuration Information."
The following table lists the log messages that the Autoscaling Application Block can write.
Note
The logging categories map to the trace sources in the application configuration file.
Message class |
Event Type |
Event ID |
Notes |
---|---|---|---|
RulesEvaluation |
Error |
1001 |
The block caught an exception while executing a rule action. The message includes details of the exception. |
RulesEvaluation |
Information |
1002 |
The block matched this rule as a rule to process during the current rules evaluation activity. |
RulesEvaluation |
Error |
1003 |
The block caught an exception while trying to load the rules from the rules store. |
RulesEvaluation |
Warning |
1004 |
The block was unable to identify a target (role or scale group) in a rule during the current rules evaluation activity. The message includes the unique ID for the evaluation activity and the name of the unidentified target. |
RulesEvaluation |
Error |
1005 |
The block was unable to load a scale group or role definition from the service information store during the current rules evaluation activity. |
RulesEvaluation |
Error |
1006 |
The block did not find any matching constraint rules for the target specified by a reactive rule. The block will not perform any scaling actions on the target. |
RulesEvaluation |
Information |
1007 |
The block matched multiple constraint rules for a target during the current rules evaluation activity. The message shows the result of reconciling the multiple constraint rules. |
RulesEvaluation |
Information |
1008 |
The block matched multiple reactive rules that specify absolute values for the change in the number of instances for a target during the current rules evaluation activity. The message shows the result of reconciling the multiple reactive rules. |
RulesEvaluation |
Information |
1009 |
The block matched multiple reactive rules that specify relative values for the change in the number of instances for a target during the current rules evaluation activity. The message shows the result of reconciling the multiple reactive rules. |
RulesEvaluation |
Information |
1010 |
The block matched multiple ChangeSetting actions for a target. |
RulesEvaluation |
Error |
1011 |
The block caught an exception when it tried to evaluate a rule. |
RulesEvaluation |
Verbose |
1013 |
The block did not scale the roles listed in this message during the current rules evaluation activity because they were recently scaled. They are currently in their cool-down period. |
RulesEvaluation |
Verbose |
1014 |
The block did not scale the roles listed in this message during the current rules evaluation activity because scale operation happened during the time at the start or end of the hour when the configuration prevents scaling operations from happening. |
DataPointsCollection |
Error |
2001 |
The block caught an exception while trying to collect data points. |
DataPointsCollection |
Error |
2002 |
The block caught an exception while trying to write to the data points persistence store. |
Scaling |
Information |
3001 |
The scaler has received a request to scale one or more targets. The message includes details of the scaling requests. |
Scaling |
Information |
3002 |
The block is about to submit a scaling request to Azure. The message includes details of the requested scaling operation. |
Scaling |
Information |
3003 |
The block has submitted a scaling request to Azure. The message includes details of the requested scaling operation. |
Scaling |
Information |
3004 |
The block will not submit the request for the configuration change to Azure. |
Scaling |
Error |
3005 |
The hosted service that contains the target that the block is attempting to scale is not currently available to accept scaling requests. |
Scaling |
Error |
3006 |
The hosted service or deployment slot that contains the target that the block is attempting to scale does not exist. |
Scaling |
Error |
3007 |
The role that the block is attempting to scale does not exist in the hosted service in Azure. |
Scaling |
Error |
3008 |
The block caught an exception when it submitted a scale request to Azure. The message includes details of the request that the block submitted. |
Scaling |
Error |
3009 |
The block could not find the setting in the configuration for the hosted service. The log message identifies the name of the missing setting. |
Scaling |
Error |
3010 |
The block caught an exception when it attempted to read the deployment information from Azure. |
Scaling |
Verbose |
3011 |
The scaler determined that no configuration change was required. |
Scaling |
Verbose |
3012 |
The scaler determined that no instance count change was required. |
RulesStore |
Error |
4001 |
The block caught an exception while it was polling a configuration file for changes. |
RulesStore |
Warning |
4002 |
The block could not find the blob when it tried to poll the blob for changes. |
RulesStore |
Error |
4101 |
The block caught an exception when it tried to load the rules from the rules store. The message includes detailed information about the cause of the exception. |
RulesStore |
Warning |
4102 |
The block was unable to load the custom action or custom parameter element definitions for a rules store extension. |
RulesStore |
Error |
4201 |
The block caught an exception when it tried to load the service information from the service information store. The message includes detailed information about the cause of the exception. |
Notification |
Error |
6001 |
The block caught an exception when it tried to send an SMTP message from a notification action. |
OperationsTracking |
Information |
7001 |
The block has successfully completed a check on the status of scaling operation. The message provides details of whether the scaling operation completed successfully or not. |
OperationsTracking |
Error |
7002 |
The block caught an exception when it requested the status of a scaling request from Azure. |
OperationsTracking |
Error |
7003 |
The block caught an exception when it attempted to read or write a tracking message to the tracking queue. |
OperationsTracking |
Error |
7004 |
The block caught an exception when it attempted to parse a tracking message from the queue. |
Scheduling |
Error |
8001 |
The block caught an exception when it attempted to acquire a lease on a blob. |
Configuring Logging
The Autoscaling Application Block configuration tool enables you to select a logging implementation for the block. You can use the logging functionality in the System.Diagnostics namespace, or the Enterprise Library Logging Block, or a custom logger. For more information, see the topic "Entering Configuration Information."
The Autoscaling Application Block uses the following logging categories:
- Autoscaling General
- Autoscaling Updates
You must configure your logger to process log messages in these categories. If you are using the Enterprise Library Logging Block, you can use the Autoscaling Application Block logging categories in a filter. If you are using system diagnostics logging, you can use the Autoscaling Application Block logging categories as trace sources.
For information about using category filters in the Enterprise Library Logging Block, see "Configuring Logging Filters" on MSDN.
For information about using trace sources in system diagnostics logging, see "How to: Create and Initialize Trace Sources" on MSDN.
Sample Configuration Settings for System Diagnostics Logging
The following snippet shows sample configuration settings from a .config file for using the system diagnostics logger with the Autoscaling Application Block.
<system.diagnostics>
<sources>
<source name="Autoscaling General" switchName="SourceSwitch"
switchType="System.Diagnostics.SourceSwitch" >
<listeners>
<add name="AzureDiag" />
<remove name ="Default" />
</listeners>
</source>
<source name="Autoscaling Updates" switchName="SourceSwitch"
switchType="System.Diagnostics.SourceSwitch" >
<listeners>
<add name="AzureDiag" />
<remove name ="Default" />
</listeners>
</source>
</sources>
<switches>
<add name="SourceSwitch"
value="Verbose, Information, Warning, Error, Critical" />
</switches>
<sharedListeners>
<add type="Microsoft.WindowsAzure.Diagnostics.DiagnosticMonitorTraceListener,
Microsoft.WindowsAzure.Diagnostics, Version=1.0.0.0, Culture=neutral,
PublicKeyToken=31bf3856ad364e35"
name="AzureDiag"/>
</sharedListeners>
<trace>
<listeners>
<add
type="Microsoft.WindowsAzure.Diagnostics.DiagnosticMonitorTraceListener,
Microsoft.WindowsAzure.Diagnostics, Version=1.0.0.0, Culture=neutral,
PublicKeyToken=31bf3856ad364e35"
name="AzureDiagnostics">
<filter type="" />
</add>
</listeners>
</trace>
</system.diagnostics>
Note
To make the sample more readable, the values of the type attributes have been split over multiple lines. In a configuration file, they should not contain any line breaks.
Sample Configuration Settings for Enterprise Library Logging Application Block Logging
The following snippet shows sample configuration settings from a .config file for using the Logging Block logger with the Autoscaling Application Block. These example configures the logger to write to a flat file.
<configSections>
<section name="loggingConfiguration" type="Microsoft.Practices.EnterpriseLibrary.Logging.Configuration.LoggingSettings, Microsoft.Practices.EnterpriseLibrary.Logging, Version=5.0.505.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="true" />
...
</configSections>
...
<loggingConfiguration name="" tracingEnabled="true" defaultCategory="General">
<listeners>
<add name="Flat File Trace Listener"
type="Microsoft.Practices.EnterpriseLibrary.Logging.TraceListeners.FlatFileTraceListener,
Microsoft.Practices.EnterpriseLibrary.Logging, Version=5.0.505.0, Culture=neutral,
PublicKeyToken=31bf3856ad364e35"
listenerDataType="Microsoft.Practices.EnterpriseLibrary.Logging.Configuration.FlatFileTraceListenerData,
Microsoft.Practices.EnterpriseLibrary.Logging, Version=5.0.505.0, Culture=neutral,
PublicKeyToken=31bf3856ad364e35"
fileName="trace.log" formatter="Text Formatter" />
</listeners>
<formatters>
<add type="Microsoft.Practices.EnterpriseLibrary.Logging.Formatters.TextFormatter,
Microsoft.Practices.EnterpriseLibrary.Logging, Version=5.0.505.0, Culture=neutral,
PublicKeyToken=31bf3856ad364e35"
template="Timestamp: {timestamp}{newline}

Message: {message}{newline}


Category: {category}{newline}

Priority: {priority}{newline}


EventId: {eventid}{newline}

Severity: {severity}{newline}


Title:{title}{newline}

Machine: {localMachine}{newline}


App Domain: {localAppDomain}{newline}

ProcessId: {localProcessId}{newline}


Process Name: {localProcessName}{newline}

Thread Name: {threadName}{newline}


Win32 ThreadId:{win32ThreadId}{newline}


Extended Properties: {dictionary({key} - {value}{newline})}"
name="Text Formatter" />
</formatters>
<categorySources>
<add switchValue="All" name="General">
<listeners>
<add name="Flat File Trace Listener" />
</listeners>
</add>
</categorySources>
<specialSources>
<allEvents switchValue="All" name="All Events">
<listeners>
<add name="Flat File Trace Listener" />
</listeners>
</allEvents>
<notProcessed switchValue="All" name="Unprocessed Category">
<listeners>
<add name="Flat File Trace Listener" />
</listeners>
</notProcessed>
<errors switchValue="All" name="Logging Errors & Warnings">
<listeners>
<add name="Flat File Trace Listener" />
</listeners>
</errors>
</specialSources>
</loggingConfiguration>
Note
To make the sample more readable, the values of the type, listenerDataType, and template attributes have been split over multiple lines. In a configuration file, they should not contain any line breaks.
Next Topic | Previous Topic | Home
Last built: June 7, 2012