In this post I wanted to explain something that is not well documented with Vmware today. The topic is how to create a custom dashboard in NSX-T based on Widgets. In the NSX-T Manager UI interface there are different monitoring dashboards out of the box that one can view and get information from. These dashboards display details about system status, networking and security and compliance reporting. You will find the dashboards by logging into NSX-T Manager and go to Home-> Monitoring Dashboards.
Here we have some already system defined dashboards:
- Status of the NSX Manager cluster and resource (CPU, memory, disk) consumption.
- NSX-T fabric, including host and edge transport nodes, transport zones, and compute managers.
- NSX-T backups, if configured. It is strongly recommended that you configure scheduled backups that are stored remotely to an SFTP site.
- Status of endpoint protection deployment.
- Networking & Security
- Status of groups and security policies
- Status of Tier-0 and Tier-1 gateways.
- Status of network segments
- Status of the load balancer VMs.
- Atatus of VPN, virtual private networks.
- Advanced Networking & Security
- Status of the load balancer services, load balancer virtual servers, and load balancer server pools
- Status of firewall, and shows the number of policies, rules, and exclusions list members.
- Status of virtual private networks and the number of IPSec and L2 VPN sessions open
- Shows the status of logical switches and logical ports, including both VM and container ports.
- Compliance Report
- Displays information regarding if objects are in compliance with set values.
In the NSX-T REST API Guide there is a section called Management Plane API: Dashboard that contains the information that is needed to create a custom dashboard called VIEW along with a widget configuration. Link to NSX-T 2.5 API Reference Guide You will need Postman or any other API Client that can GET, POST and PUT information to the NSX-T Manager. Below is my first GET command that lists all the Views that are in place and already created by the system.
By looking in the API Guide you can create the first POST command that we will send to NSX-T Manager to create a new view with some widgets POST https://nsx-t-manager/policy/api/v1/ui-views/
After getting an OK from postman we can look in the NSX-T UI once again and see that we have got a new dashboard in the dropdown list called My Own Custom View
Clicking on it will allow us to see the custom widgets that I choose in my API call to add to the dashboard view.
If you for some reason need to delete a widget from the dashboard you need to do an API call GET to list the widget id for the view and then you can do a DELETE call to delete that widget from the view.
So list all views GET https://nsx-t-manager/policy/api/v1/ui-views/
We see the ID for my custom view is View_7a09f510-4d8f-4132-b371-337408004096 So doing a get call against the view will get more information about the view. GET https://nsx-t-manager/policy/api/v1/ui-views/View_7a09f510-4d8f-4132-b371-337408004096 We can now do a DELETE call and remove the widget configuration for Groups since that widget was of no interest. Note that you will need to add /widgetconfigurations/widget_id after the view_id https://nsx-t-manager/policy/api/v1/ui-views/View_7a09f510-4d8f-4132-b371-337408004096/widgetconfigurations/DonutConfiguration_Groups-Status
Refreshing the NSX-T UI we see the widget is now removed.