StringResource
Applies To: Operations Manager 2007 R2, System Center Operations Manager 2007
Represents a localizable alert message.
Schema Hierarchy
ManagementPack
Presentation
StringResources
StringResource
Syntax
<StringResource ID=”StringResourceID”/>
Attributes and Elements
The following sections describe attributes, child elements, and the parent element of the StringResource element.
Attributes
Attribute | Description |
---|---|
ID |
Required attribute. Represents the identity of the element. To learn how to identify your element in a management pack, see Element Identity and Namespace Conventions. Generally, string resource IDs end with .AlertMessage. |
Child Elements
None.
Parent Elements
Element | Description |
---|---|
Contains all string resource definitions in a management pack. |
Remarks
String resources are used to represent localizable alert message strings. The actual string can be found in the language pack’s DisplayString section of the management pack. Each language pack in the management pack must define a DisplayString element for every string resource that is declared in the string resources section.
Example
The following XML sample illustrates how to define a string resource that refers to display string in an English language pack. In this case, the string is used to display an alert message for a UnitMonitor element.
<StringResource ID="Microsoft.Windows.Client.XP.LogicalDisk.AvailabilityHealth.AlertMessage" />
…
<LanguagePack ID="ENU" IsDefault="true">
<DisplayStrings>
<DisplayString ElementID="Microsoft.Windows.Client.XP.LogicalDisk.AvailabilityHealth.AlertMessage">
<Name>Logical Disk Not Available</Name>
<Description>The Logical Disk {0} is Not Available</Description>
</DisplayString>
</DisplayStrings>
</LanguagePack>
…
<UnitMonitor ID="Microsoft.Windows.Client.XP.LogicalDisk.AvailabilityHealth" Accessibility="Public" Enabled="onEssentialMonitoring" Target="Microsoft.Windows.Client.XP.LogicalDisk" ParentMonitorID="SystemHealth!System.Health.AvailabilityState" Remotable="true" Priority="Normal" TypeID="Microsoft.Windows.Client.XP.LogicalDisk.Monitortype" ConfirmDelivery="false">
<Category>StateCollection</Category>
<AlertSettings AlertMessage="Microsoft.Windows.Client.XP.LogicalDisk.AvailabilityHealth.AlertMessage">
<AlertOnState>Error</AlertOnState>
<AutoResolve>true</AutoResolve>
<AlertPriority>Normal</AlertPriority>
<AlertSeverity>Error</AlertSeverity>
<AlertParameters>
<AlertParameter1>$Target/Property[Type="Windows!Microsoft.Windows.LogicalDevice"]/Name$</AlertParameter1>
</AlertParameters>
</AlertSettings>
…
</UnitMonitor>