Setup the Workflow Analyzer manually (Part 3)

With the following steps you can run the Workflow Analyzer manually.

Create override for the TraceEnabled

Based on the WorkflowOverrideMP above, you can create an override for a specific object:

clip_image002[4]

This will give all instance for this class:

clip_image003[4]

In this scenario the T: on OR-CLUS-N2 with the following overrides:

clip_image005[4]

Enabled since the monitor is disabled by default. IntervalSeconds to hurry up things and Generates Alert to True. This will have no affect on the workflow if it is already enabled, but we are using this technique to help create our override in the MPs xml. The MP I created is Contoso Workflow Analyzer.

Export the MP and modify with the TraceEnabled property

Once you have created the MP, export the MP

clip_image007[4]

and then open it in your favorite XML editor (notepad will do). You will then see an override like this for the monitor

 <Monitoring>
   <Overrides>
     <MonitorPropertyOverride ID="OverrideForMonitorMicrosoftWindowsServer2008LogicalDiskMBFreeSpaceForContextMicrosoftWindowsServer2008LogicalDiska01b293e783c46e2939de5e5620dabf9" 
                              Context="Windows!Microsoft.Windows.Server.2008.LogicalDisk" 
                              ContextInstance="38ddbc99-28d1-7e70-6b32-d07db628058d" 
                              Enforced="false" 
                              Monitor="Windows1!Microsoft.Windows.Server.2008.LogicalDisk.MBFreeSpace" 
                              Property="Enabled">
       <Value>true</Value>
     </MonitorPropertyOverride>
     <MonitorPropertyOverride ID="OverrideForMonitorMicrosoftWindowsServer2008LogicalDiskMBFreeSpaceForContextMicrosoftWindowsServer2008LogicalDisk89e29c0165fa4df7b4219158537e214a" 
                              Context="Windows!Microsoft.Windows.Server.2008.LogicalDisk" 
                              ContextInstance="38ddbc99-28d1-7e70-6b32-d07db628058d" 
                              Enforced="false" 
                              Monitor="Windows1!Microsoft.Windows.Server.2008.LogicalDisk.MBFreeSpace" 
                              Property="GenerateAlert">
       <Value>true</Value>
     </MonitorPropertyOverride>
     <MonitorConfigurationOverride ID="OverrideForMonitorMicrosoftWindowsServer2008LogicalDiskMBFreeSpaceForContextMicrosoftWindowsServer2008LogicalDisk43e94531d10b4d1fad1aceb3657cd153" 
                                   Context="Windows!Microsoft.Windows.Server.2008.LogicalDisk" 
                                   ContextInstance="38ddbc99-28d1-7e70-6b32-d07db628058d" 
                                   Enforced="false" 
                                   Monitor="Windows1!Microsoft.Windows.Server.2008.LogicalDisk.MBFreeSpace" 
                                   Parameter="IntervalSeconds">
       <Value>66</Value>
     </MonitorConfigurationOverride>
   </Overrides>
 </Monitoring>

 

The Property="Enabled" and Parameter="IntervalSeconds" we leave since we need those to run the workflow, though we will use the override on the property Property="GenerateAlert" as we will use that one for Property="TraceEnabled" to make OpsMgr send the trace messages.

So we change

 <MonitorPropertyOverride ID="OverrideForMonitorMicrosoftWindowsServer2008LogicalDiskMBFreeSpaceForContextMicrosoftWindowsServer2008LogicalDisk89e29c0165fa4df7b4219158537e214a" 
                                Context="Windows!Microsoft.Windows.Server.2008.LogicalDisk" 
                                ContextInstance="38ddbc99-28d1-7e70-6b32-d07db628058d" 
                                Enforced="false" 
                                Monitor="Windows1!Microsoft.Windows.Server.2008.LogicalDisk.MBFreeSpace" 
                                Property="GenerateAlert">
         <Value>true</Value>
       </MonitorPropertyOverride>

 

In

 <MonitorPropertyOverride ID="OverrideForMonitorMicrosoftWindowsServer2008LogicalDiskMBFreeSpaceForContextMicrosoftWindowsServer2008LogicalDisk89e29c0165fa4df7b4219158537e214a" 
                                Context="Windows!Microsoft.Windows.Server.2008.LogicalDisk" 
                                ContextInstance="38ddbc99-28d1-7e70-6b32-d07db628058d" 
                                Enforced="false" 
                                Monitor="Windows1!Microsoft.Windows.Server.2008.LogicalDisk.MBFreeSpace" 
                                Property="TraceEnabled">
         <Value>true</Value>
       </MonitorPropertyOverride>

 

Now wait for the 1201 dn 1210 event on the agent

clip_image009[4]

 

Start the workflow tracing with TraceFmtSM.exe or TraceLogSM.exe

Realtime tracing is done with TraceFmtSM.exe and offline tracing is done with TraceLogSM.exe. Realtime tracing hits performance, but you can see what is happening right away.

TraceFmtSM.exe

The following options are used with TraceFmtSM.exe:

Usage:

tracefmt

-rt [<SessionName>]

-tmf [<TMFFiles>]

-display < formatted traces messages to console and output file>

-nosummary <Suppress summary file>

-o [<Output location>]

 

So in the OpsMgr folder:

C:\Program Files\System Center Operations Manager\Agent\Tools>

Run the following command first:

clip_image011[4]

and then

TraceFmtSM.exe –rt "workflowtrace" -tmf All.tmf -display -nosummary -o "c:\temp\workflowtrace.log"

It will start tracing

clip_image013[4]

TraceLogSM.exe

TraceLogSM.exe -start "WorkflowTrace" -flag 0xFF -level 5 -ft 1 -rt -guid "#c85ab4ed-7f0f-42c7-8421-995da9810fdd" -b 1024 -f c:\temp\WorkFlowTrace.etl

clip_image015[4]

Wait the time needed, some longer than the IntervalSeconds or when the etl file has content

clip_image017[4]

 

Stop the tracing for this workflow with:

TraceLogSM.exe -stop "WorkflowTrace"

clip_image019[4]

And format the ETL trace with:

TraceFmtSM.exe c:\temp\WorkFlowTrace.etl -tmf All.tmf -o c:\temp\WorkFlowTrace.log

clip_image021[4]

This can take some time, wait until you see this:

clip_image023[4]

You can now examine the WorkFlowTrace.log file, which shows like this:

[0]4576.4808::05/07/2013-10:22:47.121 [ModulesScript] [] [ModuleDebug] :CMOMScriptAPI::CreateTypedPropertyBag{MOMScriptAPI_cpp154}[MOMScriptAPI] [CreatePropertyBag] Creating property bag with Conversion type=None

[0]4576.4808::05/07/2013-10:22:47.121 [ModulesScript] [] [ModuleDebug] :CMOMPropertyBag::AddValue{MOMPropertyBag_cpp71}[MOMPropertyBag] [AddValue] Adding property 'IsNotEmpty' with value 'true'

[0]4576.4808::05/07/2013-10:22:47.121 [ModulesScript] [] [ModuleDebug] :CMOMPropertyBag::AddValue{MOMPropertyBag_cpp71}[MOMPropertyBag] [AddValue] Adding property 'PerfObject' with value 'Logical Disk'

[0]4576.4808::05/07/2013-10:22:47.121 [ModulesScript] [] [ModuleDebug] :CMOMPropertyBag::AddValue{MOMPropertyBag_cpp71}[MOMPropertyBag] [AddValue] Adding property 'PerfCounter' with value 'MbFree'

[0]4576.4808::05/07/2013-10:22:47.121 [ModulesScript] [] [ModuleDebug] :CMOMPropertyBag::AddValue{MOMPropertyBag_cpp71}[MOMPropertyBag] [AddValue] Adding property 'PerfInstance' with value 'T:'

[0]4576.4808::05/07/2013-10:22:47.121 [ModulesScript] [] [ModuleDebug] :CMOMPropertyBag::AddValue{MOMPropertyBag_cpp71}[MOMPropertyBag] [AddValue] Adding property 'PerfValue' with value '20'

[0]4576.4808::05/07/2013-10:22:47.121 [ModulesScript] [] [ModuleDebug] :CMOMScriptAPI::AddItem{MOMScriptAPI_cpp218}[MOMScriptAPI] [AddItem] Adding data item to returned collection <DataItem type="System.PropertyBagData" time="2013-05-07T10:22:47.0972805-07:00" sourceHealthServiceId="4A515B26-ADCE-9CC6-F764-C5DEE498A738"><ConversionType>PerformanceData</ConversionType><Property Name="IsNotEmpty" VariantType="8">true</Property><Property Name="PerfObject" VariantType="8">Logical Disk</Property><Property Name="PerfCounter" VariantType="8">MbFree</Property><Property Name="PerfInstance" VariantType="8">T:</Property><Property Name="PerfValue" VariantType="8">20</Property></DataItem>

 

References I used

Operations Manager 2007 Service Pack 1 Debug Tracing

https://blogs.technet.com/b/cliveeastwood/archive/2008/02/22/operations-manager-2007-service-pack-1-debug-tracing.aspx

 

Using Workflow Analyzer remotely

https://nocentdocent.wordpress.com/2010/08/23/using-workflow-analyzer-remotely/comment-page-1/

Three Cheers for the Authoring Resource Kit Tools! Part I - The Workflow Analyzer

https://blogs.msdn.com/b/steverac/archive/2009/12/30/three-cheers-for-the-authoring-resource-kit-tools-part-i-the-workflow-analyzer.aspx

 

MP Authoring Reskit: Analyze and Troubleshoot Workflows More Quickly with the Workflow Analyzer

https://www.systemcentercentral.com/mp-authoring-reskit-analyze-and-troubleshoot-workflows-more-quickly-with-the-workflow-analyzer/

Using the Operations Manager 2007 R2 Workflow Analyzer

https://operatingquadrant.com/2009/10/24/using-the-operations-manager-2007-r2-workflow-analyzer/

Workflow Analyzer

https://systemscenter.ru/resourcekithelpfile.en/html/43087d94-bdad-4d52-8ed5-203ac74013fa.htm