[40518] Failure to lock instance

PSAlert_40518_SQL_FAIL_TO_LOCK_SERVICE_ERR_Monitor (UnitMonitor)

Knowledge Base article:

Summary

The Virtual SQL Server associated with the instance will fail over if a backup node is available.

Element properties:

TargetPolyServe.MatrixServer.ServiceMonitor
Parent MonitorSystem.Health.AvailabilityState
CategoryCustom
EnabledTrue
Alert GenerateTrue
Alert SeverityError
Alert PriorityNormal
Alert Auto ResolveTrue
Monitor TypeMicrosoft.Windows.2SingleEventLog2StateMonitorType
RemotableTrue
AccessibilityPublic
Alert Message
Failure to lock instance

[{0}] Service {1} failed to lock the instance in order to start monitoring.
RunAsDefault

Source Code:

<UnitMonitor ID="PSAlert_40518_SQL_FAIL_TO_LOCK_SERVICE_ERR_Monitor" Accessibility="Public" Enabled="true" Target="PolyServe.MatrixServer.ServiceMonitor" ParentMonitorID="Health!System.Health.AvailabilityState" Remotable="true" Priority="Normal" TypeID="Windows!Microsoft.Windows.2SingleEventLog2StateMonitorType" ConfirmDelivery="false">
<Category>Custom</Category>
<AlertSettings AlertMessage="PSAlert_40518_SQL_FAIL_TO_LOCK_SERVICE_ERR_AlertMessageResourceID">
<AlertOnState>Error</AlertOnState>
<AutoResolve>true</AutoResolve>
<AlertPriority>Normal</AlertPriority>
<AlertSeverity>Error</AlertSeverity>
<AlertParameters>
<AlertParameter1>$Data/Context/Params/Param[1]$</AlertParameter1>
<AlertParameter2>$Data/Context/Params/Param[2]$</AlertParameter2>
</AlertParameters>
</AlertSettings>
<OperationalStates>
<OperationalState ID="PSAlert_40518_SQL_FAIL_TO_LOCK_SERVICE_ERR_Monitor_Alert" MonitorTypeStateID="FirstEventRaised" HealthState="Error"/>
<OperationalState ID="PSAlert_40518_SQL_FAIL_TO_LOCK_SERVICE_ERR_Monitor_Resolve" MonitorTypeStateID="SecondEventRaised" HealthState="Success"/>
</OperationalStates>
<Configuration>
<FirstComputerName>.</FirstComputerName>
<FirstLogName>MatrixServer</FirstLogName>
<FirstExpression>
<And>
<Expression>
<SimpleExpression>
<ValueExpression>
<XPathQuery Type="UnsignedInteger">EventDisplayNumber</XPathQuery>
</ValueExpression>
<Operator>Equal</Operator>
<ValueExpression>
<Value Type="UnsignedInteger">40518</Value>
</ValueExpression>
</SimpleExpression>
</Expression>
<Expression>
<RegExExpression>
<ValueExpression>
<XPathQuery Type="String">Params/Param[3]</XPathQuery>
</ValueExpression>
<Operator>MatchesRegularExpression</Operator>
<Pattern>$Target/Property[Type="PolyServe.MatrixServer.PSObject"]/ObjectKey$</Pattern>
</RegExExpression>
</Expression>
</And>
</FirstExpression>
<SecondComputerName>.</SecondComputerName>
<SecondLogName>MatrixServer</SecondLogName>
<SecondExpression>
<And>
<Expression>
<SimpleExpression>
<ValueExpression>
<XPathQuery Type="UnsignedInteger">EventDisplayNumber</XPathQuery>
</ValueExpression>
<Operator>Equal</Operator>
<ValueExpression>
<Value Type="UnsignedInteger">40519</Value>
</ValueExpression>
</SimpleExpression>
</Expression>
<Expression>
<RegExExpression>
<ValueExpression>
<XPathQuery Type="String">Params/Param[2]</XPathQuery>
</ValueExpression>
<Operator>MatchesRegularExpression</Operator>
<Pattern>$Target/Property[Type="PolyServe.MatrixServer.PSObject"]/ObjectKey$</Pattern>
</RegExExpression>
</Expression>
</And>
</SecondExpression>
</Configuration>
</UnitMonitor>