Grooming Workflows

Microsoft.SystemCenter.ServiceManager.GroomingWorkflows.Monitor (UnitMonitor)

Linking Framework Workflow Monitor

Knowledge Base article:

Summary

Usually grooming workflow failures can happen due to one of the following reasons. The active alerts view will have an alert associated with this failure. Alert knowledge will indicate the specific cause of the failure.

Causes

1. Grooming workflow failure : Workflow failures indicate that the workflow has run into a problem which caused it to stop working. A failed workflow usually implies that the issue is known.

2. Grooming workflow Time Out : If a workflow does not complete an activity within 25 minutes, it will time out. Exception is the grooming subscription log workflow that will time out in 15 minutes.

Resolutions

If Grooming workflow failure,

If Grooming workflow Time Out,

Element properties:

TargetMicrosoft.SystemCenter.ServiceManager.SmManagementServer
Parent MonitorMicrosoft.ServiceManager.Workflows.AvailabilityHealthRollup
CategoryStateCollection
EnabledTrue
Alert GenerateTrue
Alert SeverityWarning
Alert PriorityHigh
Alert Auto ResolveTrue
Monitor TypeMicrosoft.SystemCenter.ServiceManager.Workflows.OLEDB.Monitoring.DBProbeMonitorType
RemotableTrue
AccessibilityPublic
Alert Message
An error occurred in one of the grooming workflows.
Grooming Workflows Alert
RunAsDefault

Source Code:

<UnitMonitor ID="Microsoft.SystemCenter.ServiceManager.GroomingWorkflows.Monitor" Accessibility="Public" Enabled="true" Target="SM!Microsoft.SystemCenter.ServiceManager.SmManagementServer" ParentMonitorID="Microsoft.ServiceManager.Workflows.AvailabilityHealthRollup" Remotable="true" Priority="Normal" TypeID="Microsoft.SystemCenter.ServiceManager.Workflows.OLEDB.Monitoring.DBProbeMonitorType" ConfirmDelivery="false">
<Category>StateCollection</Category>
<AlertSettings AlertMessage="Microsoft.ServiceManager.GroomingWorkflows.AlertMessage">
<AlertOnState>Warning</AlertOnState>
<AutoResolve>true</AutoResolve>
<AlertPriority>High</AlertPriority>
<AlertSeverity>Warning</AlertSeverity>
</AlertSettings>
<OperationalStates>
<OperationalState ID="ComponentUnhealthy" MonitorTypeStateID="State1" HealthState="Warning"/>
<OperationalState ID="ComponentHealthy" MonitorTypeStateID="State2" HealthState="Success"/>
</OperationalStates>
<Configuration>
<IntervalSeconds>60</IntervalSeconds>
<SyncTime/>
<ConnectionString>Provider=SQLNCLI11;Server=$Target/Property[Type='SM!Microsoft.SystemCenter.ServiceManager.SmManagementServer']/SmDbHostName$;Database=$Target/Property[Type='SM!Microsoft.SystemCenter.ServiceManager.SmManagementServer']/SMDbName$;Integrated Security=SSPI</ConnectionString>
<Query>
SELECT COUNT(*)
FROM dbo.InternalJobHistory Job,
(SELECT max(timestarted) as LastTime, command
FROM dbo.InternalJobHistory
GROUP BY command) GroupJob
WHERE job.Command = GroupJob.Command
AND job.TimeStarted= GroupJob.LastTime
AND (
(job.StatusCode = '0' AND (DATEDIFF(MINUTE, job.TimeStarted , GETUTCDATE()) &gt;= 25)) OR
(job.StatusCode = '0' AND (DATEDIFF(MINUTE, job.TimeStarted , GETUTCDATE()) &gt;= 15) AND job.Command like '%Subscription%') OR
job.StatusCode ='2'
)

</Query>
<State1Filter>
<SimpleExpression>
<ValueExpression>
<XPathQuery Type="String">Columns/Column[1]</XPathQuery>
</ValueExpression>
<Operator>NotEqual</Operator>
<ValueExpression>
<Value Type="String">0</Value>
</ValueExpression>
</SimpleExpression>
</State1Filter>
<State2Filter>
<SimpleExpression>
<ValueExpression>
<XPathQuery Type="String">Columns/Column[1]</XPathQuery>
</ValueExpression>
<Operator>Equal</Operator>
<ValueExpression>
<Value Type="String">0</Value>
</ValueExpression>
</SimpleExpression>
</State2Filter>
</Configuration>
</UnitMonitor>