Discovery Status "Started" probe count incorrect


Description

Discovery Status started probe count is incorrect. In the discovery logs, the following message is seen:

Probe cannot be launched because remote Powershell probes require admin share and access to powershell on the target

Steps to Reproduce

  1. In the Discovery Classifications for a Windows OS, enable at least 1 WindowsCommand probe to be triggered after identification
  2. Run a discovery against a target that the MID server does not have admin share access
  3. The Discovery log will say that the WindowsCommand probe is prevented from launching because there is no admin share access
    Probe cannot be launched because remote Powershell probes require admin share and access to powershell on the target
  4. The Discovery Status Started Count will still include the aborted probe
  5. Since the probe never runs, the completed count will not be updated and there will be more started than completed
  6. The schedule never completes

Workaround

In the DiscoveryIDSensor and DiscoveryJSONIDSensor Script Includes, at the end of the triggerProbes function, there are these lines
probe.create(this.getAgent(), this.getEccQueueId());
++totalLaunched;

This line should be replaced with the following:
var eccQueueSysID = probe.create(this.getAgent(), this.getEccQueueId());
if (JSUtil.notNil(eccQueueSysID))
    ++totalLaunched;

This adds a check to only increment the totalLaunched number if the ecc queue record was created.
This change should be applied to both the DiscoveryIDSensor and DiscoveryJSONIDSensor Script Includes.


Upgrade to release where the issue is fixed.

If already on a release where this issue is resolved, check that following script includes are out of box:

If above scripts are not OOB, please revert to OOB.


Related Problem: PRB1394868