cancel
Showing results for 
Search instead for 
Did you mean: 
j_a_catlin
Level 11

Re: Need a custom SQL report for discovery results

I haven't had a chance to look too deeply into this to confirm my thoughts of what each status means, but I think you may want to take a look at the discoverednetobjectstatuses table in order to determine whether it is newly found or changed.  Guessing at it, it looks like a status 32 is either ignored or not added and not in the system but is a newly found node.  A status 33 makes me think that indicates a change to the Node and a statuts 1 looks to mean added.  The table has ProfileID and DiscoveredObjectID that can be joined on.  Setup a case statement on the status at that point.  I wish I had some more time to put the SQL together, but I hope my suspicious are correct and this helps get it worked out.

0 Kudos
mharvey
Level 17

Re: Need a custom SQL report for discovery results

the last two lines are merely comparing the Sysname in the Discovered Nodes table to the Caption and DNS fields in the nodes table and ensuring it doesn't match either in order to show up in the report. 

0 Kudos
pagej
Level 9

Re: Need a custom SQL report for discovery results

Thanks for the report, this is the best thing I have found and this was a post from five years ago!  Has there been any new developments around a built in report for this capability? 

0 Kudos
Highlighted
elien
Level 9

Re: Need a custom SQL report for discovery results

is there a way to ignore any new discoveries that already been mark ignore  on this report ?

0 Kudos
elien
Level 9

Re: Need a custom SQL report for discovery results

Select

DiscoveryProfiles.Name as Discovery_Name,

DiscoveredNodes.SysName as Node_Name,

Discoverednodes.IPAddress,

DiscoveryProfiles.EngineID as Poller,

DiscoveryProfiles.LastRun as LastRun

From DiscoveredNodes

Join DiscoveryProfiles on DiscoveredNodes.ProfileID = DiscoveryProfiles.ProfileID

Where IPAddress NOT IN (Select IP_Address from Nodes) AND

IPAddress Not in (Select IPAddress from NodeIPAddresses)

AND Sysname NOT IN (Select Caption from Nodes)

AND SysName NOT IN (Select DNS from Nodes)

AND IPAddress NOT IN (Select IPAddress from DiscoveryIgnoredNodes)

I was able ignore the ignore list on this report

0 Kudos