Alert w razie błędów skryptów zapewniających zgodność z wcześniejszymi wersjami.

Microsoft.SystemCenter.BackCompatModule.AlertOnScriptError (Rule)

Ta zasada generuje alerty w razie błędów skryptów zapewniających zgodność z wcześniejszymi wersjami.

Knowledge Base article:

Podsumowanie

Skrypt, który został uruchomiony w ramach skonwertowanego pakietu administracyjnego, napotkał błąd i nie został pomyślnie ukończony. Opis alertu zawiera szczegółowe informacje o przepływie pracy, który wygenerował błąd.

Przyczyny

Istnieje wiele możliwych przyczyn, na przykład:

Rozwiązania

Należy zmodyfikować skrypt, aby dodać odpowiednią obsługę warunku błędu. Ten problem powoduje generowanie jednego alertu na obiekt i przepływ pracy. Jeśli skrypt zawiera wiele błędów, a pierwsze wystąpienie zostanie naprawione, dalsze alerty nie będą widoczne do czasu zamknięcia oryginalnego alertu, ponieważ alerty dla tego samego obiektu i przepływu pracy są pomijane.

Element properties:

TargetMicrosoft.SystemCenter.HealthService
CategoryAlert
EnabledTrue
Alert GenerateTrue
Alert SeverityWarning
Alert PriorityNormal
RemotableTrue
Alert Message
Błąd skryptu zapewniającego zgodność z wcześniejszymi wersjami
{0}
Event LogOperations Manager

Member Modules:

ID Module Type TypeId RunAs 
DS DataSource Microsoft.Windows.EventProvider Default
GenerateAlert WriteAction System.Health.GenerateAlert Default

Source Code:

<Rule ID="Microsoft.SystemCenter.BackCompatModule.AlertOnScriptError" Enabled="true" Target="SCLibrary!Microsoft.SystemCenter.HealthService" ConfirmDelivery="true" Remotable="true" Priority="Normal" DiscardLevel="100">
<Category>Alert</Category>
<DataSources>
<DataSource ID="DS" TypeID="Windows!Microsoft.Windows.EventProvider">
<ComputerName>$Target/Host/Property[Type="Windows!Microsoft.Windows.Computer"]/NetworkName$</ComputerName>
<LogName>Operations Manager</LogName>
<Expression>
<And>
<Expression>
<SimpleExpression>
<ValueExpression>
<XPathQuery Type="String">PublisherName</XPathQuery>
</ValueExpression>
<Operator>Equal</Operator>
<ValueExpression>
<Value Type="String">Health Service Modules</Value>
</ValueExpression>
</SimpleExpression>
</Expression>
<Expression>
<SimpleExpression>
<ValueExpression>
<Value Type="String">$Target/ManagementGroup/Name$</Value>
</ValueExpression>
<Operator>Equal</Operator>
<ValueExpression>
<XPathQuery Type="String">Params/Param[1]</XPathQuery>
</ValueExpression>
</SimpleExpression>
</Expression>
<Expression>
<SimpleExpression>
<ValueExpression>
<XPathQuery Type="UnsignedInteger">EventDisplayNumber</XPathQuery>
</ValueExpression>
<Operator>Equal</Operator>
<ValueExpression>
<Value Type="UnsignedInteger">9100</Value>
</ValueExpression>
</SimpleExpression>
</Expression>
</And>
</Expression>
</DataSource>
</DataSources>
<WriteActions>
<WriteAction ID="GenerateAlert" TypeID="Health!System.Health.GenerateAlert">
<Priority>1</Priority>
<Severity>1</Severity>
<AlertName/>
<AlertMessageId>$MPElement[Name="Microsoft.SystemCenter.BackCompatModule.AlertOnScriptError.AlertMessage"]$</AlertMessageId>
<AlertParameters>
<AlertParameter1>$Data/EventDescription$</AlertParameter1>
</AlertParameters>
<Suppression>
<SuppressionValue>$Data/Params/Param[2]$</SuppressionValue>
<SuppressionValue>$Data/Params/Param[6]$</SuppressionValue>
</Suppression>
</WriteAction>
</WriteActions>
</Rule>