Export (0) Print
Expand All

add Element for rules for healthMonitoring (ASP.NET Settings Schema) 

Maps an event to its provider.

This element is new in the .NET Framework version 2.0.


<add name="rule's name"
     eventName="event name"
     custom="String"
     profile="profile name"
     provider="provider name"
     minInstances="number"
     maxLimit="number"
     minInterval="minimum duration between firing of events "/>

The following sections describe attributes, child elements, and parent elements for this section.

Attributes

Attribute Description

name

Required String attribute.

Specifies the name for this rule.

eventName

Required String attribute.

Specifies the name of the event.

custom

Optional String attribute.

provider

Optional String attribute.

Specifies the name of the provider.

profile

Optional String attribute.

Specifies the profile that applies to this rule.

minInstances

Optional Int32 attribute.

Specifies the minimum number of rule instances within a given application before event notification is triggered.

The default is 1.

maxLimit

Optional Int32 attribute.

Specifies the maximum number of rule instances that generate provider notifications.

minInterval

Optional TimeSpan attribute.

Specifies the minimum time interval between two events.

Child Elements

None.

Parent Elements

Element Description

configuration

Specifies the root element in every configuration file that is used by the common language runtime and the .NET Framework applications.

system.web

Specifies the root element for the ASP.NET configuration section.

healthMonitoring

Configures an application for health monitoring.

rules

Maps events to providers.

The following default add element is configured in the root Web.config file in the .NET Framework version 2.0.

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

The following code example shows how to add a rule.

<rules>
  <add name="Sample Web Requests"
    eventName="SampleWebRequests"
    provider="SampleEventProvider"
    profile="Default"
    minInterval="00:01:00" />
</rules>

Configuration section handler

System.Web.Configuration.HealthMonitoringSection

Configuration member

System.Web.Configuration.HealthMonitoringSection.Rules

Configurable locations

Machine.config

Root-level Web.config

Application-level Web.config

Requirements

Microsoft Internet Information Services (IIS) version 5.0, 5.1, or 6.0

The .NET Framework version 2.0

Microsoft Visual Studio 2005

Community Additions

ADD
Show:
© 2014 Microsoft