Share via


AlertSettings (AggregateMonitor)

Applies To: System Center 2012 - Operations Manager, System Center 2012 R2 Operations Manager, System Center 2012 SP1 - Operations Manager

Defines the alert to generate when the monitor reflects a specified unhealthy state.

Schema Hierarchy

ManagementPack
  Monitoring
    Monitors
      AggregateMonitor
        AlertSettings

Syntax

<AlertSettings AlertMessage=””>
   <AlertOnState>Warning/Error</AlertOnState>
   <AutoResolve>True/False</AutoResolve>
   <AlertPriority>Low/Normal/High</AlertPriority>
   <AlertSeverity>Error/Information/MatchMonitorHealth/Warning</AlertSeverity>
   <AlertParameters>…</AlertParameters>
</AlertSettings>

Attributes and Elements

The following sections describe attributes, child elements, and the parent elements of the AlertSettings element.

Attributes

Attribute Description

AlertMessage

Optional attribute. References the ID of a StringResource element that provides a localized name and description.

Child Elements

Element Description

AlertOnState (AggregateMonitor)

Required element. Specifies the minimum unhealthy state at which an alert will be generated.

AutoResolve (AggregateMonitor)

Required element. Determines whether or not the alert will be automatically resolved when the health state of the monitor returns to healthy.

AlertPriority (AggregateMonitor)

Required element. Always has a value of “Normal.”

AlertSeverity (AggregateMonitor)

Optional element. Specifies the severity of the alert.

AlertParameters (AggregateMonitor)

Optional element. Contains any alert parameters that are used to populate the description of an alert with contextual data.

Parent Elements

Element Description

AggregateMonitor

Defines a state machine whose health state is determined by an algorithmic analysis of its children.

UnitMonitor

Defines an implementation of a unit monitor type definition that determines the health of targeted class type instances.

DependencyMonitor

Defines a state machine whose health state is determined by an algorithmic analysis of a hosting or containment relationship’s target instances.

Remarks

If you do not specify a StringResource element for the AlertMessage attribute, the name and description of the alert will default to the name of the description of the monitor that created the alert. Usually, it is a best practice to specify a string resource, both to provide a more appropriate name and description for the alert and to support localization within your management pack.

Before you can specify a string resource, you must define one in the StringResources section in your management pack.

<StringResources>
  <StringResource ID="Microsoft.SQLServer.2005.DBEngine.ServiceMonitor.AlertMessage"/>
</StringResources>

Next, you must define a DisplayString element that defines the name and description of your alert message. The display string element references the string resource, Microsoft.SQLServer.2005.DBEngine.ServiceMonitor.AlertMessage. Display strings are located in the LanguagePack section of your management pack.

<DisplayStrings>
  <DisplayString ElementID="Microsoft.SQLServer.2005.DBEngine.ServiceMonitor.AlertMessage">
    <Name>SQL Server Service Stopped</Name>
    <Description>The Windows service for the DB Engine instance has stopped.</Description>
  </DisplayString>
</DisplayStrings>

Finally, the full monitor definition is defined as follows.

<UnitMonitor ID="Microsoft.SQLServer.2005.DBEngine.ServiceMonitor" Accessibility="Internal" Enabled="true" Target="SQL2005Core!Microsoft.SQLServer.2005.DBEngine" ParentMonitorID="SystemHealth!System.Health.AvailabilityState" Remotable="true" Priority="Normal" TypeID="Windows!Microsoft.Windows.CheckNTServiceStateMonitorType" ConfirmDelivery="false">
  <Category>AvailabilityHealth</Category>
  <AlertSettings AlertMessage="Microsoft.SQLServer.2005.DBEngine.ServiceMonitor.AlertMessage">
    <AlertOnState>Error</AlertOnState>
    <AutoResolve>true</AutoResolve> 
    <AlertPriority>Normal</AlertPriority> 
    <AlertSeverity>Error</AlertSeverity> 
  </AlertSettings>
  <OperationalStates>
    <OperationalState ID="Success" MonitorTypeStateID="Running" HealthState="Success"/>
    <OperationalState ID="Error" MonitorTypeStateID="NotRunning" HealthState="Error"/>
  </OperationalStates>
  <Configuration>
    <ComputerName>$Target/Host/Property[Type="Windows!Microsoft.Windows.Computer"]/NetworkName$</ComputerName>
    <ServiceName>$Target/Property[Type="SQL!Microsoft.SQLServer.DBEngine"]/ServiceName$</ServiceName>
  </Configuration>
</UnitMonitor>

The display string in the preceding example does not allow for any contextual information within the alert description. If you want to provide contextual information, you can do so by providing up to 10 alert parameters. For more information about how to use parameters within alerts, see AlertParameters (AggregateMonitor).

See Also

Reference

AggregateMonitor
AlertParameters (AggregateMonitor)
DisplayString
LanguagePack
StringResource
StringResources