| |||||||||||||||||||||||||
<healthMonitoring> SectionASP.NET Syntax ASP.NET Configuration Sections .NET Framework version 2.0 Configures an application for health monitoring. <healthMonitoring enabled = "true|false" heartbeatInterval = "time interval"> <bufferModes>...</bufferModes> <providers>...</providers> <eventMappings>...</eventMappings> <profiles>...</profiles> <rules>...</rules> </healthMonitoring> Attributes and ElementsThe following sections describe attributes, child elements, and parent elements for this section. Attributes
Child Elements
Parent Elements
RemarksThis configuration section applies at the machine or application level. Default ConfigurationThe following default healthMonitoring element is configured in the root Web.config file in the .NET Framework version 2.0. <healthMonitoring>
<bufferModes>
<add name = "Critical Notification" maxBufferSize = "100" maxFlushSize = "20"
urgentFlushThreshold = "1" regularFlushInterval = "Infinite" urgentFlushInterval = "00:01:00"
maxBufferThreads = "1" />
<add name = "Notification" maxBufferSize = "300" maxFlushSize = "20" urgentFlushThreshold = "1"
regularFlushInterval = "Infinite" urgentFlushInterval = "00:01:00"
maxBufferThreads = "1" />
<add name = "Analysis" maxBufferSize = "1000" maxFlushSize = "100" urgentFlushThreshold = "100"
regularFlushInterval = "00:05:00" urgentFlushInterval = "00:01:00"
maxBufferThreads = "1" />
<add name = "Logging" maxBufferSize = "1000" maxFlushSize = "200" urgentFlushThreshold = "800"
regularFlushInterval = "00:30:00" urgentFlushInterval = "00:05:00"
maxBufferThreads = "1" />
</bufferModes>
<providers>
<add name = "EventLogProvider"
type = "System.Web.Management.EventLogWebEventProvider, System.Web, Version=2.0.0.0,
Culture=neutral,PublicKeyToken=b03f5f7f11d50a3a" />
<add ConnectionStringName = "LocalSqlServer" maxEventDetailsLength = "1073741823"
buffer = "false" bufferMode = "Notification" name = "SqlWebEventProvider"
type = "System.Web.Management.SqlWebEventProvider, System.Web, Version=2.0.0.0,
Culture=neutral,PublicKeyToken=b03f5f7f11d50a3a" />
<add name = "WmiWebEventProvider"
type = "System.Web.Management.WmiWebEventProvider, System.Web, Version=2.0.0.0,
Culture=neutral,PublicKeyToken=b03f5f7f11d50a3a" />
</providers>
<profiles>
<add name = "Default" minInstances = "1" maxLimit = "Infinite" minInterval = "00:01:00"
custom = "" />
<add name = "Critical" minInstances = "1" maxLimit = "Infinite" minInterval = "00:00:00"
custom = "" />
</profiles>
<rules>
<add name = "All Errors Default" eventName = "All Errors" provider = "EventLogProvider"
profile = "Default" minInstances = "1" maxLimit = "Infinite" minInterval = "00:01:00"
custom = "" />
<add name = "Failure Audits Default" eventName = "Failure Audits"
provider = "EventLogProvider" profile = "Default" minInstances = "1" maxLimit = "Infinite"
minInterval = "00:01:00" custom = "" />
</rules>
<eventMappings>
<add name = "All Events"
type = "System.Web.Management.WebBaseEvent, System.Web, Version=2.0.0.0,
Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
startEventCode = "0" endEventCode = "2147483647" />
<add name = "Heartbeats"
type = "System.Web.Management.WebHeartbeatEvent, System.Web, Version=2.0.0.0,
Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
startEventCode = "0" endEventCode = "2147483647" />
<add name = "Application Lifetime Events"
type = "System.Web.Management.WebApplicationLifetimeEvent, System.Web, Version=2.0.0.0,
Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
startEventCode = "0" endEventCode = "2147483647" />
<add name = "Request Processing Events"
type = "System.Web.Management.WebRequestEvent, System.Web, Version=2.0.0.0,
Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
startEventCode = "0" endEventCode = "2147483647" />
<add name = "All Errors"
type = "System.Web.Management.WebBaseErrorEvent, System.Web, Version=2.0.0.0,
Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
startEventCode = "0" endEventCode = "2147483647" />
<add name = "Infrastructure Errors"
type = "System.Web.Management.WebErrorEvent, System.Web, Version=2.0.0.0,
Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
startEventCode = "0" endEventCode = "2147483647" />
<add name = "Request Processing Errors"
type = "System.Web.Management.WebRequestErrorEvent, System.Web, Version=2.0.0.0,
Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
startEventCode = "0" endEventCode = "2147483647" />
<add name = "All Audits"
type = "System.Web.Management.WebAuditEvent, System.Web, Version=2.0.0.0,
Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
startEventCode = "0" endEventCode = "2147483647" />
<add name = "Failure Audits"
type = "System.Web.Management.WebFailureAuditEvent, System.Web, Version=2.0.0.0,
Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
startEventCode = "0" endEventCode = "2147483647" />
<add name = "Success Audits"
type = "System.Web.Management.WebSuccessAuditEvent, System.Web, Version=2.0.0.0,
Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
startEventCode = "0" endEventCode = "2147483647" />
</eventMappings>
</healthMonitoring>
ExampleThe following code example shows how to configure an application to monitor health status. <healthMonitoring enabled = "true" heartbeatInterval = "00:00:00">
<!-- Configure the providers -->
<providers>
<add name = "SampleEventProvider"
type = "Samples.AspNet.SampleEventProvider, SampleEventProvider, Version=0.0.0.0,
Culture=neutral, PublicKeyToken=92029af6cf75bd7c,ProcessorArchitecture=Neutral" />
</providers>
<!-- Configure the events -->
<eventMappings>
<add name = "SampleWebRequests"
type = "Samples.AspNet.SampleWebRequestEvent, SampleWebRequestEvent, Version=0.0.0.0,
Culture=neutral, PublicKeyToken=f0c63b9a560d5e5a" />
</eventMappings>
<!-- Define the rules -->
<rules>
<add name = "Sample Web Requests"
eventName = "SampleWebRequests"
provider = "SampleEventProvider"
profile = "Default"
minInterval = "00:01:00" />
<add name = "Standard Web Requests"
eventName = "All Events"
provider = "SampleEventProvider"
profile = "Default"
minInterval = "00:01:00" />
</rules>
</healthMonitoring>
See AlsoASP.NET Configuration HealthMonitoringSection Class |
| ||||||||||||||||||||||||
Check out related books at Amazon
© 2000-2008 Rey Nuñez All rights reserved.
If you have any question, comment or suggestion
about this site, please send us a note
You can help support aspxtreme