Best way to report which discovery models are related to a software model

Aaron Munoz
Tera Guru

There is a method to see which discovery models belong to a software model by opening the form of the software model and clicking "Show Matching Discovery Models".

find_real_file.png

This opens the list in a separate tab and depends on a client-callable script include called SAMPQueryAJAX.

find_real_file.png

What is the best way to show the relationship between all software models and their associated discovery models, preferably as a report? The options I thought about are: using a database view, having a calculated field in the discovery model table, or using Performance Analytics using a breakdown relation or a manual breakdown.

1 ACCEPTED SOLUTION

This post mentions a database view that covers some of the need but is not yet available in the platform https://community.servicenow.com/community?id=community_blog&sys_id=83f7b6c81b654110be4955fa234bcb15

View solution in original post

5 REPLIES 5

Scott Halverso1
Mega Guru
Mega Guru

This isn't quite what your are looking for.  This report shows all the software models that have entitlements that are missing discovery models. We do this all through a script include dynamically.  For what you are looking to do a database view won't work.  It needs to run as a query.  I'd recommend scripting a scheduled job and populating a custom table.  Precomputing the data is the only way to get any performance out of it.  For our approach we didn't precompute the data and it's really slow even with adding database indexes.

find_real_file.png

Thanks Scott, a report like that would be very helpful. Could that be available is an out-of-box dashboard?

So far your suggestion of a custom table for keeping track of the many-to-many relationship between software models and discovery models seems like the only way. Additional findings below:

Seems like the software discovery models have a reference field to software models, though it is empty in every record.

find_real_file.png

The only documented way we have found to populate it is a UI action called "Match model" as mentioned in the article below, which is under ITSM asset management:

 
find_real_file.png
This seems like a deprecated functionality and the instructions in the article above can't be followed. For this screenshot I had to set the Active field to True since it is False by default. Seems like instances without SAM Pro don't even have this form button.
 
The requirement is for SAM admins to analyze which discovery models are related to which software model, or which ones don't have a matching software model.

Elie Baho1
Giga Contributor

Thank goodness, I thought I was going crazy trying to find the software model related to the Discovery model.  I also noticed the software model link in the Discovery models table was empty most likely because it's an N:N relationship.

The only report view OOTB I found was from the Software Models table, you can extract the DMAP equivalent, but the Discovery Map table (samp_sw_entitlement_definition) can't report the Discovery Models...

I understand the path to all these tables, but I just can't report on them OOTB.

If anyone has more practical hands-on knowledge between the Discovery Models vs the Software Models, let me know!

This post mentions a database view that covers some of the need but is not yet available in the platform https://community.servicenow.com/community?id=community_blog&sys_id=83f7b6c81b654110be4955fa234bcb15