Discovery is not updating the AWS tag values of virtual machine instance.

Nikhil kumar ma
Tera Contributor

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

5 REPLIES 5

Sohail Khilji
Kilo Patron
Kilo Patron

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.

 

Ref: https://www.servicenow.com/community/itom-articles/aws-custom-tags-update-in-servicenow-virtual-serv...

 


☑️ Please mark responses as HELPFUL or ACCEPT SOLUTION to assist future users in finding the right solution....

LinkedIn - Lets Connect

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

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....

LinkedIn - Lets Connect

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