Install status and Hardware_status in cmdb_ci_hardware table
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-02-2024 02:43 AM
Hi All,
Hope everyone doing great!
A quick suggestion needed, I would like to make the install_status and Hardware_status to be updated as retired when the asset decommissioned for asset type not computer. I have written the Transform map script to update the fields, but it's not seems to work after introduced the IRE process.
Currently, it is updaing like the install status of cmdb_ci_hardware table is retired and the corresponding hardware_status is installed. Any idea on this?
Apreciate quick help!!
Thanks!!!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-02-2024 06:31 AM - edited ‎10-02-2024 06:32 AM
To ensure install_status and hardware_status update correctly for non-computer assets when decommissioned, follow these steps:
Check Transform Map Script: Ensure your script correctly checks the asset type and state:
if (current.asset_type != 'computer' && current.state == 'decommissioned') {
current.install_status = 'retired';
current.hardware_status = 'retired'; // Adjust as needed
}
IRE Overrides: Review the IRE process for any logic that might override your updates.
Business Rules: Look for conflicting business rules on the cmdb_ci_hardware table that could reset hardware_status.
Order of Operations: Ensure your transform map runs at the right time in the import process.
Debugging: Add logging to your script to verify it executes as expected:
gs.info("Updating asset: " + current.sys_id);
2. Test in Isolation: Temporarily disable other rules to see if your script works without interference.
3. Check Data Consistency: Ensure the asset's state is correctly set to 'decommissioned.'
By checking these areas, you should resolve the update issue.
if you found this helpful please accept as solution and mark helpful
best
Chetna
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-04-2024 02:45 PM
The issue you’re encountering is due to the Identification Reconciliation Engine (IRE), which might be overriding your custom logic. To address this, consider adding an additional step in your Transform Map script to account for IRE rules:
1. Modify IRE Rules: Ensure the IRE isn’t overriding your updates. You may need to adjust reconciliation definitions.
2. Script Adjustment: In your script, make sure both install_status and hardware_status are explicitly updated after the IRE processes the records.
Testing IRE impacts and adjusting rules should resolve this c
onflict.
Best regards
Achin Chawla