Discovery is not updating the AWS tag values of virtual machine instance.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-18-2024 03:09 AM
Hi Community,
Recently, we are facing an issue that all tag values of virtual machine instances created by AWS is not getting updated by Discovery, All the VMIs have the same value when they created in ServiceNow first time. Tag values have been updated in AWS side but in ServiceNow we have the same old tag values for aws virtual machine instances.
Please suggest some troubleshooting steps to fix this issue asap.
Thanks and regards,
Nikhil
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-18-2024 03:25 AM - edited 03-18-2024 03:26 AM
Hi @Nikhil kumar ma ,
The tags field on CI record will not be populated with the discovery. The Tags are populated differently in Key-Value Pair Table i.e. cmdb_key_value. The table must be available in the related list of the record, if its not there then you can add it there by configuring the related list.
☑️ Please mark responses as HELPFUL or ACCEPT SOLUTION to assist future users in finding the right solution....
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-18-2024 04:01 AM
Hi Sohil,
I have checked cmdb_key_value table for one of the virtual machine instances and I am seeing the old values present for all the attributes. Do I need to do something in ServiceNow so that these fields get updated with the latest values?
Regards,
Nikhil
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-18-2024 04:06 AM
Create a business rule like this :
(function executeRule(current, previous /*null when async*/ ) {
//Find Business Service based on Key,Value with Correlation ID
var gr = new GlideRecord("cmdb_ci_vm_instance");
gr.addQuery("sys_id", current.configuration_item.toString());
gr.query();
if(gr.next()) {
var bu = new GlideRecord("business_unit");
bu.addQuery("name", current.value.toString());
bu.query();
if(bu.next()) {
gr.business_unit = bu.sys_id.toString();
gr.update();
}
}
})(current, previous);
☑️ Please mark responses as HELPFUL or ACCEPT SOLUTION to assist future users in finding the right solution....
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-18-2024 04:12 AM
Hi Sohil,
We already have "All tag values" tab under the related list of all the CIs. But they have old values not the latest values.
Regards,
Nikhil