Skip to content
Tags

Monitoring VMware Horizon View pool status

27.03.2015

I have a VMware Horizon View virtual desktop automated pool which configuration basis is:

  • floating user assignment
  • composer linked clone
  • persona management
  • delete VM after user logoff

Configuration brings virtual desktops to recompose every night after user logoff. And I should say everything works just fine till now although I didn’t believe it would when it was in testing environment. Yes, I had some problems which were related to configuration mistakes, but none of them related to VMware.

After almost 2 years of non-interruptable servicing it finally broken. Desktop rocomposing was very slow, it almost stopped. The issue described on VMware community relates to VSA (Volume Storage Accelerator), implemented in VMware View starting from version 5.1 and which is not good in my configuration. Issuie resolved simply by disabling VSA and restarting ESXi hypervisors.

This event made me thinking of how to monitor pool state. I suggested the dashboard values shoud be monitored:

  • Prepared for use
  • Connected
  • Available

As VMware does not provide any well known way to export these values from dashboard, it needed some investigation. View stores virtual desktop properties in LDAP directory on View connection broker server and summary of connected clients in Windows performance counters. After some research I constructed query to get these amounts. As I wanted to monitor using Zabbix, I needed a .vbs-script that runs via Zabbix Agent by corresponding «UserParameter». Configuring Zabbix is not the problem I met, it discribed on the Internets. The whole point is .vbs-script. Well, it is:

Counter = WScript.Arguments.Item(0)
Result = 0
Set strADsPath = GetObject("LDAP://127.0.0.1:389/OU=Servers,DC=vdi,DC=vmware,DC=int")
' Available
if Counter = "Available" then
 for each strADsPathObject in strADsPath
 if strADsPathObject.[pae-VmState] = "READY" then Result = Result + 1 end if
 if strADsPathObject.[pae-DirtyForNewSessions] = 1 then Result = Result - 1 end if
 next
end if
' Connected
if Counter = "Connected" then
 Set objWMIService = GetObject("winmgmts:\\.\ROOT\CIMV2")
 Set WMIItems = objWMIService.ExecQuery("SELECT AllSessions FROM Win32_PerfRawData_VMwareVDM_VMwareVDM")
 For Each WMIItem in WMIItems
 Result = WMIItem.AllSessions
 Next
end if
' Prepared for Use
if Counter = "Prepared" then
 for each strADsPathObject in strADsPath
 if strADsPathObject.[pae-VmState] = "READY" then Result = Result + 1 end if
 next
end if
strADsPath = Nothing
WScript.Echo Result

Run the script using cmd with the wollowing command:

cscript /nologo vdistats.vbs [Available|Connected|Prepared]

Script result has some variance in comparison with dashboard data, especially when pool meets errors. This refers to the data calculation method as it’s not clear how to calculate from LDAP. Anyway, if you find greater way to automate monitoring, please comment!

Реклама

From → VMware

Добавить комментарий

Добавить комментарий

Заполните поля или щелкните по значку, чтобы оставить свой комментарий:

Логотип WordPress.com

Для комментария используется ваша учётная запись WordPress.com. Выход / Изменить )

Фотография Twitter

Для комментария используется ваша учётная запись Twitter. Выход / Изменить )

Фотография Facebook

Для комментария используется ваша учётная запись Facebook. Выход / Изменить )

Google+ photo

Для комментария используется ваша учётная запись Google+. Выход / Изменить )

Connecting to %s

%d такие блоггеры, как: