Issue in Operational Status Updated twice in VM Instance

KrushnakumaT
Tera Guru

We’re noticing that the Operational Status field on VM Instance (cmdb_ci_vm_instance) records is being updated twice whenever the SGC (Service Graph Connector) job runs. This results in duplicate audit entries and unnecessary processing. Currently we saw 2-3 CIs having this issue.

Kindly help me to resolve this issue. Any suggestions or guidance would be greatly appreciated.

 

Screenshot 2025-06-04 102454.png

1 ACCEPTED SOLUTION

KrushnakumaT
Tera Guru

As per ServiceNow’s suggestion, the duplicate updates are caused by the "Cascade Operational Status to vminstance" Business Rule.
During the SGC job, the parent server CI’s operational_status is updated multiple times, triggering the cascade repeatedly and updating VM Instances twice.

Fix (per ServiceNow): Add the following check at the start of the script to ensure it only runs when the field actually changes:


if (!current.operational_status.changes()) {
return;
}
Also review if the SGC job is already updating VM Instances directly—if so, the Business Rule may be redundant.

View solution in original post

2 REPLIES 2

Abbas_5
Tera Sage
Tera Sage

Hello @KrushnakumaT,

 

The Operational Status field on VM Instance CIs is being updated twice by the SGC job due to duplicate update requests. This can lead to duplicate audit entries and unnecessary processing. To resolve this, you need to investigate the source of the duplicate updates, potentially by checking ECC queue messages and identifying rules related to the CMDB update process. 
 
Here's a more detailed breakdown of steps to troubleshoot and fix the issue:
1. Investigate the ECC Queue:
  • Check ECC Queue Messages:
    Examine the ECC Queue for the SGC job to see if multiple messages are being generated for the same VM Instance CI and its Operational Status field. 
     
  • Identify the Source:
    Look for the specific discovery pattern or rule that's causing the duplicate updates. 
     
  • Review ECC Input Payload:
    Analyze the input payload to ensure it's being correctly classified and the data is consistent. 
     
2. Review Identification and Update Rules:
  • CI Identification Rules:
    Verify that the identification rules for cmdb_ci_vm_instance are correctly configured to match the VM Instance CIs. 
     
  • Update Rules:
    Check for any update rules that might be causing the field to be updated twice or in a way that generates duplicate updates. 
     
  • Data Precedence Rules:
    Examine data precedence rules to ensure they're not overwriting or creating unintended updates. 
     
3. Debug the Discovery Pattern:
  • Ensure Correct Attribute Assignment:
    Verify that the discovery pattern is properly extracting and assigning attributes to the VM Instance CIs.
  • Check for Bugs:
    If you've customized the discovery pattern, make sure it's free of bugs or inconsistencies.
  • Consider Upgrades:
    Ensure that your ServiceNow instance is up-to-date with the latest patches or updates. 
     
4. Review Logs and Configuration:
  • Review Discovery Logs:
    Check the discovery logs for any error messages or inconsistencies that might indicate the source of the problem. 
     
  • Configuration:
    Examine the configuration settings for the SGC job, especially those related to discovery and update processes. 
     
  • Audit Logs:
    Analyze audit logs to see when and how the Operational Status field was updated. 
     
5. Potential Causes and Solutions:
  • Duplicate Updates from Discovery:
    If the SGC job is discovering the same VM Instance multiple times, this could lead to duplicate updates. Investigate the discovery settings and schedule. 
     
  • Customizations:
    If you've customized discovery patterns or update rules, they might be causing the duplicate updates. Carefully review your customizations and compare them to ServiceNow's documentation. 
     
  • Version Control Issues:
    If there are version control issues with your customizations, it might be causing the duplicate updates. Ensure your customizations are properly managed and synchronized. 
     
By systematically checking these areas and reviewing the relevant documentation and logs, you should be able to identify the cause of the duplicate Operational Status updates and implement a solution to prevent them from happening again. 
 
If this is helpful, please hit the thumbs up button and accept the correct solution by referring to this solution in future it will be helpful to them.
 
Thanks & Regards,
Abbas Shaik

KrushnakumaT
Tera Guru

As per ServiceNow’s suggestion, the duplicate updates are caused by the "Cascade Operational Status to vminstance" Business Rule.
During the SGC job, the parent server CI’s operational_status is updated multiple times, triggering the cascade repeatedly and updating VM Instances twice.

Fix (per ServiceNow): Add the following check at the start of the script to ensure it only runs when the field actually changes:


if (!current.operational_status.changes()) {
return;
}
Also review if the SGC job is already updating VM Instances directly—if so, the Business Rule may be redundant.