Retrieving NSX Manager System Info Using Rest API

By | 27/06/2017

In this post we will explore how NSX manager system info can be retrieved via Rest API. NSX manager appliance home page is itself very descriptive and provides all system info. 

In this post we will learn how the same system info can be explored via API calls. Let’s get started.

Query NSX Manager Information

Below API query will provide you info like what is the major and minor version of NSX appliance you are running along with patch number and build number

Example: curl -k -u “vcadmin@corp.local” -X GET https://nsxmgr-01a.corp.local/api/1.0/appliance-management/global/info | tidy -xml -indent -quiet

Query NSX Manager Summary Information

This API query will present you with all info which you used to see from the NSX manager homepage. This call can be used to obtain all system related info in one shot. 

Example: curl -k -u “admin” -X GET https://nsxmgr-01a.corp.local/api/1.0/appliance-management/summary/system | tidy -xml -indent -quiet

You can also get details about individual components like CPU/Memory and Storage using below queries

Memory Info:

Example: curl -k -u “admin:Password” -X GET https://nsxmgr-01a.corp.local/api/1.0/appliance-management/system/meminfo | tidy -xml -indent -quiet

CPU Info

Example: curl -k -u “admin:Password” -X GET https://nsxmgr-01a.corp.local/api/1.0/appliance-management/system/cpuinfo | tidy -xml -indent -quiet

Storage Info

Example: curl -k -u “admin:Password” -X GET https://nsxmgr-01a.corp.local/api/1.0/appliance-management/system/storageinfo | tidy -xml -indent -quiet

Get vCenter Configuration Details

This API query will provide you details about vCenter to which this NSX manager is registered. 

Example: curl -k -u “admin” -X GET https://nsxmgr-01a.corp.local/api/2.0/services/vcconfig | tidy -xml -indent -quiet

Get vCenter Server connection status

Example: curl -k -u “admin” -X GET https://nsxmgr-01a.corp.local/api/2.0/services/vcconfig/status | tidy -xml -indent -quiet

Thats it. This is how you can generate system related info for your nsx manager. Above API calls can be used in scripting for doing a daily health check on your NSX manager. 

I hope you enjoyed reading this post. Feel free to share this on social media if it is worth sharing. Be sociable

Category: NSX

About Alex Hunt

Hi All I am Manish Jha. I am currently working in OVH US as Operations Support Engineer (vCloud Air Operations). I have around 7 Years of IT experience and have exposure on VMware vSphere, vCloud Director,vSphere Replication, vRealize Automation, NSX and RHEL. If you find any post informational to you please press like and share it across social media and leave your comments if you want to discuss further on any post. Disclaimer: All the information on this website is published in good faith and for general information purpose only. I don’t make any warranties about the completeness, reliability and accuracy of this information. Any action you take upon the information you find on this blog is strictly at your own risk. The Views and opinions published on this blog are my own and not the opinions of my employer or any of the vendors of the product discussed.