Trigger Manual discovery for unrefreshed devices

Mitsua
Tera Guru
Tera Guru

Hello Everyone ,

 

I have requirement to Trigger Manual discovery for unrefreshed devices.

There is a discovery dashboard on which "Unrefreshed Device" report is present. So I want to trigger manual discovery for those unrefreshed device using script or any other way.

 

Is there any way to do this? 

 

Thanks in Advance

MS

 

5 REPLIES 5

Daniel Borkowi1
Mega Sage

Hi @Mitsua, yes there is an API for that DiscoveryAPI in Docs  and Article on Developer site. 

You can also have a look on the implementation of UI Action Discover Now in CI records.

Put this in a loop over the CI which are referenced as the unrefreshed CIs.

var d = new Discovery();
var sys_id = d.discoveryFromCI(current.sys_id,'Discover_now_ci');

But keep in mind mostly unrefreshed devices is caused by not reachable targets  and not by missing them in discovery schedules.

Greets
Daniel

Please mark reply as Helpful/Correct, if applicable. Thanks!

Thank you So much @Daniel Borkowi1  for quick help.

So now I am running above script for specific device for testing purpose. 

Script is executed with success also discovery ahs been started for that device but it is showing in only active state and that device has not updated.

Please refer the below screenshot of discovery log:

Mitsua_0-1691045348189.png

Can you please let me know what this indicates and why device is not getting discovered?

 

Thank You

MS!

Daniel Borkowi1
Mega Sage

Hi @Mitsua , this shows only, that discovery is started. Skipping the probe is no issue, it shows only that your Port probe for Certification Discovery is deactivate - it's only needed if you want to do Certification management within the platform. Does the discovery status today shows the same? Seems that this is stucked - what is showing in the ECC Queue related list? 

Greets
Daniel

Please mark reply as Helpful/Correct, if applicable. Thanks!

 

Hello @Daniel Borkowi1 

 

I have activated that port probe. Now it is showing same message. 

Please refer below image : Now it is showing below warning. Can you please guide me what actions I need to take for this warning or to discovered that CI?

Mitsua_0-1691139131516.png