There are times when you are not sure why your discovery is not running. You have tested it in pre-production, and the discovery works just fine. But when the management pack is deployed to production, it’s failing to discover anything.

To troubleshoot a workflow that is not running
  1. On the RMS, click Start, point to Programs (or All Programs), point to System Center Operations Manager 2007 R2, point to Authoring Tools, and click Workflow Analyzer.

    Note
    You will need Operations Manager Admin User Role rights and Administrator rights on the server where the discovery is not running.
  2. In the Start a new session window, select Start a new Workflow Analysis session and enter the RMS name. In Select HealthService to analyze, select the Health Service where the discovery is not running and click Start.

    Note
    It may take a few seconds for the Select HealthService to analyze drop-down menu to populate if you have a large number of agents.
  3. The Workflow Analyzer window displays a list of workflows on that Health Service. In the Filter field, type in the name of the discovery to find it.

  4. When you locate the discovery and confirm that it is in a Not Running state, check if the Enabled column is set to true. If it is not set to true, you must enable the discovery. Although Enabled can be set to true here, the actual discovery when downloaded to the agent may have an override that disables it. You can check for this by right-clicking the discovery and choosing Analyze.

    A new window opens and shows you relevant information about this discovery, such as whether this discovery has been disabled through an override targeted to a group.

Another area to troubleshoot is trying to determine why your monitor or rule workflow is in a Not Running state.

To troubleshoot monitor or rule workflow
  1. In the WFAnalyzer, choose the Health Service where the rule or monitor is supposed to be running.

  2. Search for the rule or monitor name and verify the Status column. If the status is Not Running, right-click and click Analyze. A new window will appear with details about that workflow.

  3. Verify if there are any workflow instances. If there are none, check the Target Discoveries in the Summary pane. Search for that discovery to determine if it is enabled.

  4. After searching for the discovery, check if it is running.

  5. If the discovery is running, right-click the discovery and click Analyze to verify if there are any workflow instances.

  6. If there are workflow instances, close the Workflow Details window. In Workflow Analyzer, right-click the discovery and click Trace. At this point, you want to confirm if the discovery actually discovered anything.

  7. In the TraceWorkflow window, you can view what is being run in the discovery and see the resultant output.

  8. Eventually, you will see something like the following if nothing was discovered because that server doesn’t have the application installed or there is a bug in the discovery logic:

    Module column: DiscoveryFilter

    Method column: OnNewDataItems

    Trace column: Received DataItem <DataItem type="System.DiscoveryData" time="2009-09-24T09:30:56.1004335-07:00" sourceHealthServiceId="BF70F9EF-FB93-E9F5-DE1A-0139E12012E2"><DiscoveryType>0</DiscoveryType><DiscoverySourceType>0</DiscoverySourceType><DiscoverySourceObjectId>{767A7E59-3E04-3946-6FAD-642143A7FEBD}</DiscoverySourceObjectId><DiscoverySourceManagedEntity>{EEA5AF38-AECC-6FFC-A828-976825162E7B}</DiscoverySourceManagedEntity></DataItem>

    If there is no <CreateInstance/> XML element in the Trace column output, then an instance will not be created.

  9. Going up in the trace, you can see what is performed by the discovery. Below is an example from the VMM MP:

    Module column: BatchResponse

    Method column: RunProcess

    Trace column: BatchResponseRunProcessCreating application 'C:\WINDOWS\System32\cscript.exe' with command line '"C:\WINDOWS\System32\cscript.exe" /nologo "C:\Program Files\System Center Operations Manager 2007\Health Service State\Monitoring Host Temporary Files 42\6132\DiscoverVMMEngine.vbs" {767A7E59-3E04-3946-6FAD-642143A7FEBD} {EEA5AF38-AECC-6FFC-A828-976825162E7B} learnopsmgr.redmond.corp.microsoft.com' in working directory 'C:\Program Files\System Center Operations Manager 2007\Health Service State\Monitoring Host Temporary Files 42\6132\'

  10. In the above, you must now determine what is happening in the script that is causing this failure on this computer. You have two options:

    • Debug the script locally on that computer by launching the above script via cscript.exe with the //x flag to launch it under the debugger.

    • Debug the script in the Workflow Simulator and attempt to reproduce the problem on a computer running VMM locally in a developer or test environment where the Authoring console and Authoring Resource Kit tools are installed.

See Also