As a follow-up of my exploration of the HPE PDU REST API I wanted to create a Powershell module as a wrapper for the API. I’ve previously written a post on how to create a Powershell module as a wrapper for an API here. The PDU module will be built in the same way where there will be a private function that handles the actual API requests
This post is a (late) follow-up on a previous post I did about exploring the monitoring endpoints of the vCenter Server Appliance (VCSA), and an addition to the vSphere Performance blog series. Now we will add performance metrics and health status of the VCSA to our monitoring solution. We’ll utilize the REST APIs in vCenter and feed the data into our Influx database and visualize it in Grafana. In vCenter we have the Appliance Management page also refered to as the VAMI.
Lately I’ve been playing around with the Redfish based REST API in the HPE G2 Metered and Switched Power Distribution Units. Through the API you are able to pull some details about the PDU as well as different utilization data. Based on your PDUs capabilities you should also be able to control different outlets. My focus has been to pull some details about the PDUs, and to pull the load on the different segments.
For a long time, actually since we migrated to the VCSA in 6.5 last year, I’ve wanted to utilize the REST API in the appliance to have some monitoring of them. For several reasons I’ve had to put that on hold, one of them being that there seems to be something wrong with the back-end authentication calls. I get authentication errors on certain calls no matter which user I am logged in with (also the vsphere.
We all love today’s modern web with lots of API’s available, both for retrieving information from various sources, gaining additional insights and for transform and enrich your data. Most API’s today are RESTFUL, meaning that they should follow the REST principles. REST is not a standard, it’s more a guideline for how to design your API. With the REST guidelines in place many API’s share the same or similar structure and with that it gets easier to work with API’s as you can make use of the same techniques.