BFI - counting Software Installations

When I go to Reports > Software Installations (/sam/software_facts), I get 126.
When I hit (what I think is the right API endpoint) of /api/sam/v2/software_instances I get 143.

What is the right way to pull back the 126 value from the API?

anyone have any suggestions?

I’m still looking into it - but my first impression is that the v2 software instances includes history. Setting a criterion of “discovery_end”, “=” ,“9999-12-31T23:59Z” on the v2 API call should account for most of the difference.

i was playing around with the discovery_end date too. Some have dates like your example of year 9999 but others have dates in this year or last (even though I never entered them anywhere in BFI),

Once BFI no longer detects the presence of the software installation, it puts a value in this field. This is primarily for the management of software with high water mark metrics, like PVU. As long as a software component is detected by a scan and picked up in the import process, BFI will set the discovery_end date to 12/31/9999. If the component is not present in the import, BFI sets the discovery_end date to the date and time of the import.

In my environment I have 641 installed software products (software_facts), but just 656 when excluding historical records. I’m checking for the source of the disagreement.

@cstoneba As far as I can tell, the discrepancy between the v1 and v2 API calls comes down to the existence of multiple discovery paths pointing to the same software components.

The v1 API call probably rolls them up as a single component, and therefore reports the same number of Software Installations as the UI. The v2 API calls return all discovered instances of currently and previously installed software instances, including these duplicated components.

To get the numbers to match up, I had to add another filter, is_suppressed = 0, to the v2 API. I also found that is_present = 1 is a much simpler way of selecting for currently installed software.

https://aaa.bbb.ccc:9081/api/sam/v2/software_instances?criteria={"and":[["is_present", "=", 1],["is_suppressed", "=", 0]]}&token=xxxxx

Since the v2 software_instance is more sophisticated than v1 (naturally), it really depends on the involvement of someone in the software asset manager role to properly classify the software in your environment. This is particularly important for IBM software.

Using the Software Classification report, all but one of each of the duplicated software instances on each machine should be suppressed. (You’ll note that the default filter on this report is the same as the one I recommended above). This could also be achieved with a REST API call.

Note that, as of version 9.2.14, only IBM software will have a value in discovery_path. With other vendors, the installation path may only be seen via the details link in the UI, which shows the signature used to identify the software.

Since i’m just interested in the count, I added “&countSwitch=2” at the end which makes it run much faster and doesn’t output all the software data.

https://xxxxx/api/sam/v2/software_instances?criteria={"and":[["is_present", "=", 1],["is_suppressed", "=", 0]]}&token=xxxxx&countSwitch=2

However, in one of my environments, the count of the API calls matched the UI. But in our 2nd environment, the API was 1.4% higher than the UI.

That could be due to un-suppressed instances of IBM software with multiple discovery paths. You could adjust the API call to filter for IBM software, and return the discovery_guid and discovery_path data to check.

Another option is to go to the Software Classification report in the UI and remove the suppressed = no filter, and see how many entries that returns.

So Software Classifications in the UI with default filters has the same row count as the API /v2/software_instances?criteria={"and":[["is_present", "=", 1],["is_suppressed", "=", 0]] which is different than the Software Installations count in the UI.

I’m not sure which is the correct representation of our environment (Software Installations or Software Classifications) but we haven’t found a way to get the API to report back the same number as Software Installations.

Looks like the new dashboard’s (/sam/dashboard) Software Installation link goes to Software Classifications and not Software Installations.

1 Like

After giving this some more thought, I would say that the Software Classifications listing is the more accurate.

Consider this scenario:

Software XYX is licensed by its publisher on a per-installation basis. You would need to know if it were installed more than once per machine. At this point, the Software Installations report would show only one install at most per machine, while the Software Classifications report would reveal the additional installations on those machines.

Previously I had said:

Using the Software Classification report, all but one of each of the duplicated software instances on each machine should be suppressed.

I should revise this to say:

If the license agreement allows multiple installations, using the Software Classification report, all but one of the duplicated software instances on each machine should be suppressed.

Yes, that sounds accurate. It’s just interesting that on the main BFI dashboard under Inventory Data that the Software Installation link is front and center as to say it is most very important but in reality it doesn’t list all possible duplicate installs.

thanks for all your help

You’re welcome.

I agree, but I find BFI/LMT to be a work in progress, so the Software Installation report might be retired or updated to be more accurate at some point.

In 9.2.15 Software installations panel is now based on Software Classification, so no more discrepancies

1 Like