HealthMonitoring and health monitoring, healthmonitoring

Source: Internet
Author: User

HealthMonitoring and health monitoring, healthmonitoring

Configure a service for application running status monitoring

The configuration section is more complex than before, as shown below:

 

In fact, this is a runtime monitoring model that defines and processes events. Simply put, the basic points of the overall runtime monitoring are as follows:

1. Define events in eventMappings

2. Define event processing in providers

3. Bind events to a Handler through rules.

A little more, you can also include the following points

1. The event can contain parameters, which are defined in profiles and specified by rules when an event is bound.

2. the handler can have the buffer function, which is defined in bufferModes and specified to the corresponding handler in providers.

All the child nodes in the configuration are a set. The following shows the features of elements in several key sets.

EventMappings: the friendly name of the device.

Name: Event-friendly name (unique identifier)

Type: name of the fully qualified type of the event

StartEventCode and endEventCode: specify the actual range of the Event code identifier

Profiles: Event Configuration

Name: Specifies the configuration file name (unique identifier)

MinimumInstances: the minimum number of times an event appears before it is triggered.

MaximumLimit: Specifies the threshold. When this threshold is reached, the event will be stopped.

MinimumInterval: specifies the minimum interval between two events, expressed as "hh: mm: ss"

Providers: a set of event processing types.

Name: Specifies the friendly name (unique identifier) of the provider)

Type: indicates a fully qualified assembly reference to a class.

Buffer: Specifies whether the provider uses a buffer or sends each event to the recipient immediately. This parameter is only applicable when the type is the SqlWebEventProvider class.

BufferMode: Specifies the name of the buffer mode used by the provider (if the provider is in the buffer mode ). This name must reference one of the existing buffer modes in the BufferModesCollection set; otherwise, an exception is thrown. If buffering is enabled, this attribute must exist and only applies to the SQLWebEventProvider attribute.

Rules: maps an event to its provider (bind a processing class to the event for processing)

Name: Specifies the name of the rule.

EventName, provider, and profile: Association reference for other configuration sections

MinInstances: Minimum number of rule instances within a given application before event notification is triggered

MaxLimit: specifies the maximum number of rule instances that generate the provider notification.

MinInterval: specifies the minimum interval between two events.

Check that there are similar attributes in profiles and rules. Although there are the same minimum number of times, maximum number, and minimum interval, in terms of text, it is determined by rules first, then, Judge by providers.

Looking at the previous descriptions and a blog I read before (it seems that I copied a lot in MSDN ). As long as you understand the event processing model, the content of this configuration section and its functions will be easy to understand. The Framework defines several events and several event handlers. The appendix section after the blog post is the events and handlers defined in ASP. NET. Developers can expand it as needed. However, no matter how you modify it, you also need to add a new rule.

In addition, I learned from the blog or MSDN that, if you need to trigger an event by yourself, you can call the Raise () method of WebBaseEvent.

<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>Event <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 "/>Event Handler

 

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.