How to get the hostname for Azure VM instances (cmdb_ci_vm_instance) through discovery

Mohit Kaushik
Mega Sage
Mega Sage

Hi Everyone.

We have a discovery set up in our instance for Azure resources. We are using OOB solution and getting the Cis discovered. Now for some integration purpose we need the hostname of Azure VM instances. Can someone tell me which step I should modify in the pattern "Azure - Virtual Machine (LP)" to get the hostname. We have a custom field u_hostname on cmdb_ci_vm_instance table and we want to add the hostname of Azure CIs in that field.

Any help will be appreciated.

 

Thanks,
Mohit Kaushik

Thanks,
Mohit Kaushik
ServiceNow MVP (2023-2025)
2 REPLIES 2

Niklas Peterson
Mega Sage
Mega Sage

Hi @Mohit Kaushik ,

The hostname is on the Computer CI, not the Instance CI. Azure Discovery is not enough to connect to the two CI's. When you run a Horizontal Discovery or ACC-V Discovery on the host, the CI relationship between the host and the vm instance is created.

Regards,
Niklas

 

Rahul Priyadars
Giga Sage
Giga Sage

Please run Horizontal or IP Based Discovery it will bring OS based Host into Corresponding Classes.

Some helpful KBs

https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0864549

https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0963681

Regards

RP