关于删除的 Power Shell 脚本的警报

Microsoft.SystemCenter.PowerShellModule.AlertOnDroppedResponses (Rule)

关于删除的 Power Shell 脚本的警报。

Knowledge Base article:

摘要

由于使用过度,System Center 管理运行状况服务无法将 PowerShell 脚本作为规则或监视器的一部分运行。

这将会影响某些监视或发现。

原因

这可能是以下原因引起的:

解决方法

警报描述和上下文包含指明哪个规则或监视器失败的信息。但是也可能有其他规则或监视器失败。以下链接将显示指示运行可执行文件时失败的所有事件:

查看 PowerShell 事件

查看了上下文中的错误之后,请考虑降低 PowerShell 脚本的频率。

确保计算机没有过度使用。

如果计划的 PowerShell 脚本太多,也可能导致此问题。这可能是由事件风暴或配置错误的计时器引起的。在这两种情况下,必须检查规则配置以确定 PowerShell 脚本运行过于频繁的原因,由于某种原因通常必须取消规则配置(增加间隔)。

Element properties:

TargetMicrosoft.SystemCenter.HealthService
CategoryAlert
EnabledTrue
Alert GenerateTrue
Alert SeverityWarning
Alert PriorityNormal
RemotableTrue
Alert Message
已删除 Power Shell 脚本
{0}
Event LogOperations Manager

Member Modules:

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

Source Code:

<Rule ID="Microsoft.SystemCenter.PowerShellModule.AlertOnDroppedResponses" 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>
<XPathQuery Type="String">Params/Param[1]</XPathQuery>
</ValueExpression>
<Operator>Equal</Operator>
<ValueExpression>
<Value Type="String">$Target/ManagementGroup/Name$</Value>
</ValueExpression>
</SimpleExpression>
</Expression>
<Expression>
<SimpleExpression>
<ValueExpression>
<XPathQuery Type="UnsignedInteger">EventDisplayNumber</XPathQuery>
</ValueExpression>
<Operator>Equal</Operator>
<ValueExpression>
<Value Type="UnsignedInteger">22411</Value>
</ValueExpression>
</SimpleExpression>
</Expression>
</And>
</Expression>
</DataSource>
</DataSources>
<ConditionDetection ID="Consolidator" TypeID="System!System.ConsolidatorCondition">
<Consolidator>
<ConsolidationProperties>
<PropertyXPathQuery>Params/Param[1]</PropertyXPathQuery>
</ConsolidationProperties>
<TimeControl>
<WithinTimeSchedule>
<Interval>300</Interval>
</WithinTimeSchedule>
</TimeControl>
<CountingCondition>
<Count>10</Count>
<CountMode>OnNewItemTestOutputRestart_OnTimerSlideByOne</CountMode>
</CountingCondition>
</Consolidator>
</ConditionDetection>
<WriteActions>
<WriteAction ID="GenerateAlert" TypeID="Health!System.Health.GenerateAlert">
<Priority>1</Priority>
<Severity>1</Severity>
<AlertName/>
<AlertMessageId>$MPElement[Name="Microsoft.SystemCenter.PowerShellModule.AlertOnDroppedResponses.AlertMessage"]$</AlertMessageId>
<AlertParameters>
<AlertParameter1>$Data/Context/DataItem/EventDescription$</AlertParameter1>
</AlertParameters>
<Suppression>
<SuppressionValue>$Data/Context/DataItem/Params/Param[2]$</SuppressionValue>
</Suppression>
</WriteAction>
</WriteActions>
</Rule>