次の方法で共有


healthMonitoring 要素 (ASP.NET 設定スキーマ)

状態の監視に対応したアプリケーションを構成します。

この要素は、.NET Framework Version 2.0 で追加されました。

<healthMonitoring 
   Enabled="true|false"
   heartbeatInterval="time interval">
   <bufferModes>...</bufferModes>
   <providers>...</providers>
   <eventMappings>...</eventMappings>
   <profiles>...</profiles>
   <rules>...</rules>
</healthMonitoring>

属性および要素

以降のセクションでは、このセクションに示す属性、子要素、および親要素について説明します。

属性

属性

説明

enabled

必須の Boolean 属性です。

状態の監視を有効にするかどうかを指定します。 true の場合、状態の監視は有効になります。

heartbeatInterval

必須の TimeSpan 属性です。

WebHeartbeatEvent イベントが発生する間隔を秒単位で指定します。

既定値は "00:00:00" です。これは、WebHeartbeatEvent イベントが発生しないことを示します。

子要素

要素

説明

bufferModes

省略可能な要素

プロバイダーのバッファリング能力を定義します。

eventMappings

省略可能な要素

イベントの表示名を関連するイベントの種類にマップします。

profiles

省略可能な要素

イベント構成時に使用できるパラメーター セットのコレクションを定義します。

providers

省略可能な要素

イベントを処理する状態監視プロバイダーを定義します。

rules

省略可能な要素

イベントをプロバイダーに割り当てます。

親要素

要素

説明

configuration

共通言語ランタイムおよび .NET Framework アプリケーションで使用されるすべての構成ファイルで必要なルート要素を指定します。

system.web

ASP.NET 構成セクションのルート要素を指定します。

解説

この構成セクションは、マシン レベルまたはアプリケーション レベルで適用されます。

既定の構成

次の既定の healthMonitoring 要素は、.NET Framework Version 2.0 においてルートの Web.config ファイルで構成されています。

<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>

使用例

状態を監視するためのアプリケーションを構成する方法を次のコード例に示します。

<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>

要素情報

構成セクション ハンドラー

System.Web.Configuration.HealthMonitoringSection

構成メンバー

SystemWebSectionGroup.HealthMonitoring

構成できる場所

Machine.config

ルート レベルの Web.config

アプリケーション レベルの Web.config

要件

Microsoft Internet Information Services (IIS) バージョン 5.0、5.1、または 6.0

.NET Framework Version 2.0

Microsoft Visual Studio 2005

参照

処理手順

方法 : ASP.NET 構成設定をロックする

参照

system.web 要素 (ASP.NET 設定スキーマ)

configuration 要素 (全般設定スキーマ)

healthMonitoring の bufferModes 要素 (ASP.NET 設定スキーマ)

healthMonitoring の eventMappings 要素 (ASP.NET 設定スキーマ)

healthMonitoring の profiles 要素 (ASP.NET 設定スキーマ)

healthMonitoring の providers 要素 (ASP.NET 設定スキーマ)

healthMonitoring の profiles 要素 (ASP.NET 設定スキーマ)

healthMonitoring の rules 要素 (ASP.NET 設定スキーマ)

System.Configuration

System.Web.Configuration

System.Web.Management

概念

ASP.NET 構成の概要

ASP.NET Web サーバー コントロールとブラウザーの機能

ASP.NET 構成の保護

ASP.NET の構成のシナリオ

その他の技術情報

ASP.NET Health Monitoring System

ASP.NET 構成ファイル

ASP.NET 構成設定

全般構成設定 (ASP.NET)

ASP.NET 構成 API