healthMonitoring elementu (ASP.Schemat ustawień netto)
[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]
Konfiguruje aplikację monitorowania zdrowia.
Ten element jest nowego w.NET Framework w wersji 2.0.
<healthMonitoring
Enabled="true|false"
heartbeatInterval="time interval">
<bufferModes>...</bufferModes>
<providers>...</providers>
<eventMappings>...</eventMappings>
<profiles>...</profiles>
<rules>...</rules>
</healthMonitoring>
Atrybuty i elementy
W poniższych sekcjach opisano atrybuty i elementy podrzędne elementy nadrzędne dla tej sekcji.
Atrybuty
Atrybut |
Opis |
---|---|
enabled |
Wymagane Boolean atrybut. Określa, czy włączono monitorowania zdrowia. Jeśli true, monitorowania zdrowia jest włączona. |
heartbeatInterval |
Wymagane TimeSpan atrybut. Określa interwał, w sekundach, jak często WebHeartbeatEvent zdarzenie jest wywoływane. Wartością domyślną jest "00:00:00", która wskazuje, że nie WebHeartbeatEvent zdarzenie jest wywoływane. |
Elementy podrzędne
Element |
Opis |
---|---|
bufferModes |
Opcjonalnego elementu. Definiuje możliwości buforowania dla dostawcy. |
eventMappings |
Opcjonalnego elementu. Mapowania nazw przyjaznych zdarzeń na typy zdarzenia. |
profiles |
Opcjonalnego elementu. Określa zbiór parametr zestawów używanych podczas konfigurowania zdarzeń. |
providers |
Opcjonalnego elementu. Określa dostawców monitorowania zdrowia zdarzenia tego procesu. |
rules |
Opcjonalnego elementu. Zdarzenia jest mapowany na dostawców. |
Elementy nadrzędne
Element |
Opis |
---|---|
configuration |
Określa element główny wymagane w każdym pliku konfiguracyjnym, który jest używany przez aparatu plików wykonywalnych języka wspólnego oraz.NET Framework aplikacji. |
system.web |
Określa element główny dla aplikacji ASP.Sekcja konfiguracji netto. |
Uwagi
Ta sekcja konfiguracji ma zastosowanie na poziomie aplikacji lub stanowiska.
Domyślna konfiguracja
Następujące domyślne healthMonitoring element jest skonfigurowany w pliku Web.config katalogu głównego w.NET Framework w wersji 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>
Przykład
Poniższy przykład kodu pokazuje, jak skonfigurować aplikację do monitorowania stanu zdrowia.
<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>
Informacje o elementach
Program obsługi sekcji konfiguracji |
|
Członkowskie konfiguracji |
|
Lokalizacje konfigurowalne |
Machine.config Web.config na poziomie katalogu głównego Poziom aplikacji Web.config |
Wymagania |
Microsoft Internet Information Services (IIS) w wersji 5.0, 5.1 lub 6.0 .NET Framework w wersji 2.0 Microsoft Visual Studio 2005 |
Zobacz też
Zadania
How to: Lock ASP.NET Configuration Settings
Informacje
System.Web elementu (ASP.Schemat ustawień netto)
Konfiguracja elementu (schemat ustawień ogólne)
bufferModes elementu dla healthMonitoring (ASP.Schemat ustawień netto)
eventMappings elementu dla healthMonitoring (ASP.Schemat ustawień netto)
Profile elementu healthMonitoring (ASP.Schemat ustawień netto)
dostawców elementu healthMonitoring (ASP.Schemat ustawień netto)
Profile elementu healthMonitoring (ASP.Schemat ustawień netto)
zasady elementu healthMonitoring (ASP.Schemat ustawień netto)
Koncepcje
ASP.NET Configuration Overview
ASP.NET Server Controls and Browser Capabilities
Inne zasoby
ASP.NET Health Monitoring System
ASP.NET ustawienia konfiguracji