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>

属性および要素

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

属性

属性

Description

enabled

必須の Boolean 属性です。

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

heartbeatInterval

必須の TimeSpan 属性です。

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

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

子要素

要素

Description

bufferModes

省略可能な要素です。

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

eventMappings

省略可能な要素です。

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

profiles

省略可能な要素です。

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

providers

省略可能な要素です。

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

rules

省略可能な要素です。

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

親要素

要素

Description

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

参照

処理手順

How to: Lock ASP.NET Configuration Settings

Reference

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

ASP.NET Server Controls and Browser Capabilities

Securing Configuration

Configuration Inheritance

その他の技術情報

ASP.NET Health Monitoring System

ASP.NET Configuration Files

ASP.NET 構成設定

全般構成設定 (ASP.NET)

ASP.NET Configuration API