Viewing VMware Unified Access Gateway statistics with REST

logo

<Tap Tap> Is this thing still on? Good!

The VMware Unified Access Gateway really is a wonderful device. With a quick deployment of an OVF you’re up and running with free remote access to your VMware Horizon environment. The device is so simple in fact, that it’s often a case of set and forget, it does the hard work freeing you up to do more important things.

A request came in from a customer last year to be able to view more about what this little magic appliance is doing, how healthy it is and how many  users it is currently servicing.

For VMware vRealize Operations for Horizon customers, this data is all available directly in the VROPS portal, but what if you don’t have VMware vRealize Operations for Horizon? or want to query this in an automated fashion?

Well the good news is, the clever engineers behind this project not only allowed RESTful configuration of the product, they also allowed restful retrieval of the information too!

if  you browse to https://<your device IP or name>:9443/rest/v1/monitor/stats you’ll get all the info you could want as below: (after you authenticate, of course).

webviewIn the XML REST response you get above, you’ll get the information about the device health and also the services (horizon, authentication, etc.).

So that’s great, but wouldn’t it be nice if we could get that information from PowerShell too?

I’ve thrown together a Powershell module here you can use or hack apart for your own purposes to allow you to query your own Unified Access Gateway appliances.

Simply import the module:

importmodule

from here you can see the exported cmdlets:

commands

and here are the two exports below:

Get-VMwareUAGHorizonStats:

stats

Get-VMwareUAGHealth:

stats1

 

So that’s it! A big thank you to my colleague Mark Benson for the endless, cheerful help. Despite how much of a pest i can be!

Related Posts

New VMware Fling – Horizon HelpDesk Agent Just a quick note on the blog that I've put together a new VMware fling, the first of many (hopefully!). The VMware Horizon HelpDesk Agent is built...
Using the VMware Horizon API from c# So here's an ask I've had for well over a year, which i duly neglected until the mind of the brilliant Sean Massey decided to send me a PM on the vExp...
Creating an automated VMware Horizon RDS Pool with...   So VMware Horizon 6.2 was announced at VMworld just a week ago and the one feature I sorely wanted to see was automated provisioning (golden...

One Comment About “Viewing VMware Unified Access Gateway statistics with REST

  1. Pingback: Keep your information security team happy with VMware AirWatch Per-App VPN – Thomas Cheng

Leave a Reply