vCenter Discovery - Get custom attributes in vSphere
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-05-2025 09:14 AM
Hi,
Our organization is looking to bring all VMs that are managed in vSphere into our CMDB. For data consistency we have created custom attributes in vSphere to normalize the information no matter what kind of VM we are looking at. We would like to bring said attributes in the CMDB.
Now the question is how do i bring the attributes from vCenter/vSphere. I've looked through ServiceNow Documentation about Discovery/probes/patterns.
Now it seems that vCenter Discovery is particular on it's on way, so it is very unclear if bringing custom attributes is actually faisable and if so how do you configure to get the end result?
Appreciate any input!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-11-2025 06:51 AM
To bring custom attributes from vSphere into the CMDB using Discovery Pattern Extensions, you can follow these steps. Extensions allow you to modify or enhance existing patterns without directly customizing them, ensuring easier upgrades and maintenance.
Steps to Use Extensions for vSphere Discovery Patterns
- Navigate to the Discovery Patterns Module
- In the ServiceNow instance, go to Pattern Designer → Discovery Patterns.
- Search for the vSphere Discovery pattern you want to extend (e.g., "vCenter Discovery").
- Create a New Extension
- Open the selected pattern.
- In the Extensions section, click New to create a new extension.
- Provide a descriptive name for the extension (e.g., "vSphere Custom Attributes").
- Save the extension, and it will appear in the list of extensions for the pattern.
- Design the Extension in Pattern Designer
- Click on the newly created extension to open it in the Pattern Designer.
- Add a new step to query the vSphere API for custom attributes.
- Use the HTTP Get Call operation or any other relevant operation to interact with the vSphere API.
- Ensure you have the correct API endpoint and credentials configured.
- Parse the Custom Attributes
- Add a step to parse the response from the vSphere API.
- Use operations like Parse Variable or Set Parameter Value to extract the custom attributes and store them in temporary variables.
- Map the Custom Attributes to CMDB Fields
- Add a step to map the parsed custom attributes to the appropriate fields in the CMDB.
- Use the Set Parameter Value operation to assign the custom attributes to the corresponding CMDB fields.
- Test the Extension
- Use the Debug option in the Pattern Designer to test the extension.
- Provide the IP address or hostname of a vSphere instance and verify that the custom attributes are being retrieved and mapped correctly.
- Activate the Extension
- Once the extension is tested and validated, save and activate it.
- The extension will now run as part of the discovery process for the selected pattern.
- Run Discovery and Validate
- Run a discovery schedule that uses the extended pattern.
- Check the CMDB to ensure the custom attributes are being populated correctly.
Key Considerations
- Ensure you have the necessary permissions to access the vSphere API and retrieve custom attributes.
- Always test the extension in a non-production environment before deploying it to production.
- Extensions are executed in the order they are listed. If there are conflicting values, the last extension to run will take precedence.
Supporting Documentation
- ServiceNow Documentation: Modify Patterns Using Extensions
https://www.servicenow.com/docs/bundle/vancouver-it-operations-management/page/product/service-mappi... - ServiceNow Documentation: Discovery Patterns Overview
https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB1612162 - VMware vSphere API Documentation
https://developer.vmware.com/apis
By using extensions, you can enhance the vSphere Discovery process to include custom attributes without directly modifying the base patter
If you believe the solution provided has adequately addressed your query, could you please **mark it as 'Helpful'** and **'Accept it as a Solution'**? This will help other community members who might have the same question find the answer more easily.
Thank you for your consideration.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-11-2025 07:00 AM
Please don't post AI generated content.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-10-2025 04:36 AM
Aa Kieran wrote, tags are imported into [cmdb_key_value] table.