Datadog

Datadog Expertise

RapDev is a Datadog Premier Partner focused on accelerating our customers’ time to value.
600
Implementations
110
US-Based Engineers
68
Datadog Certifications

Security & Managed SOC

Quickly and seamlessly implement Cloud SIEM, ASM, SCA, and Cloud Security Posture Management to power a modern DevSecOps strategy

Incident Management

Transform data into high-confidence, actionable incidents using AI-driven detection, clear ownership models, and automated remediation

Marketplace Integrations

RapDev is proud to offer more Datadog Marketplace integrations than any other partner

ServiceNow

ServiceNow Expertise

RapDev is a ServiceNow Elite partner focused on helping you drive business outcomes with the ITx suite.
4.7
CSAT Score
136
Product Line Certs.
67k
AI Agents Discovered

Agentic AI & AI Governance

Deploy and scale production-ready agentic AI to automate workflows and accelerate ServiceNow outcomes

Enterprise Architecture

Connect your technology landscape to business strategy to optimize investments, reduce risk, and accelerate modernization

ServiceNow Store

Leverage RapDev’s certified apps and AI Agents to expedite operations on the Now Platform
Blog
Company

About RapDev

RapDev is powered by a team of experienced, U.S. based engineers focused on redefining service operations through AI, automation, and modern observability.

Join the RapDev team

Our no-frills approach to collaborating is what allows us to deliver the best. Our team is growing and we’re looking for the best in the game.

Press

Latest news and announcements from RapDev

Events & Webinars

From hands-on workshops to industry-leading conferences

Resources

Back to blog

SAM Normalization Failing and How to Fix It

Troubleshooting SAM Normalization Failures: Quick Fixes and Best Practices

X

min read

September 3, 2024

Ben Savage

I suspect you ended up reading this blog post as your SAMP normalization is failing and you don’t know how to fix it. Luckily, we at Rapdev have the answer.

SAM Normalization in your instance is probably, 99% of the time, failing as you activated the “Automatically create software models for all ‘licensable’ products” property in the SAMP properties. 

This property:

Located within the SAM Properties:

The key is that this property SHOULD be active. You need software models associated with your software discovery models. It’s what links installs to the software models. And creating the software models manually is a brutal task. 

In SAMP it is vital to have valid mapping to publishers and manufacturers from your software discovery models and software models. These relationships often get misaligned and that is the root cause of the failing of normalization.  AKA, this:

In case you haven’t found that table yet, it’s called “samp_reconciliation_result”. Add the “Progress summary” column to the list to view the error(s). 

The fix

So, normalization is failing and it’s probably due to the publishers and manufacturers tied into your SAM data. Luckily ServiceNow has a knowledge article that contains two fix scripts. Here is a link to the article.

As KB articles can “disappear”, here is a screen shot of the article:

Let’s break down a component of the scripts that the article refers to. 

Within “sysauto_script_9785060487a15110293c31173cbb3539 (1).xml” the first function is fixing the publishers associated to the installs. This function queries all of your installs and updates the associated normalized publisher to the manufacturer associated to the normalized products publisher’s. Hopefully I didn’t lose you there 😊:


var installGa = new GlideAggregate('cmdb_sam_sw_install');
if (installGa.isValid()) {
installGa.addNotNullQuery('discovery_model');
installGa.addNotNullQuery('norm_product');
installGa.addNotNullQuery('norm_product.publisher.manufacturer');
installGa.groupBy('norm_product.publisher.manufacturer');
installGa.query();
while (installGa.next()) {
var manufacturer = installGa.getValue('norm_product.publisher.manufacturer');
var installGr = new GlideRecord('cmdb_sam_sw_install');
installGr.addQuery('norm_product.publisher.manufacturer', manufacturer);
installGr.setValue('norm_publisher', manufacturer);
installGr.setWorkflow(false);
installGr.updateMultiple();
}
gs.log('**********Fix script - Fixed Software Installs**********', "CoreCompanyFixScript");
}

The remainder of that script and the subsequent script basically rinse and repeat alignment activities. Here is a full copy of both scripts.

Suggested next steps:

In SANDBOX or a recent clone of the instance.

  1. Log the percentage complete on your last normalization run. 68.87% etc.
  2. Run “sysauto_script_9785060487a15110293c31173cbb3539 (1).xml” as a background script. 
  3. Rerunning reconciliation and note the percentage complete. If it completes, you are good to go. 
  4. If not, log the second run time percentage and run the second script.
  5. Rerun normalization and you should have fixed the problem.

FYI, when pushing to prod you can also run both script as one time scheduled jobs to automate the promotion!

Interested to learn more? Reach out to our team at chat@rapdev.io