Getting data out of vCOps

I’ve been troubleshooting a specific problem where storage latency jumps very high during very short periods of time, usually in the late evening/very early morning hours. The latency is very bad, sometimes in the 2,000ms+ neighborhood. My storage guys see an extreme increase in IOPS coming from my ESXi hosts just before the latency comes into play. The working thought was several VMs were kicking off some type of disk intensive batch job around the same time. This would be a perfect use of the vCOps troubleshooting Top N charts, but the issue doesn’t appear every day and is typically resolved before anyone noticed. Since the Top N charts are realtime they are not super useful in this situation.

What I needed was a way to export which VMs were contributing high IO around the time of the poor latency. Clicking around in vCOps I couldn’t find a way to get this data. (Side note: if anyone knows a good way to do this, please leave a comment.) However, a co-worker pointed me at an unofficial vCOps powershell module available here: http://velemental.com/2012/09/04/unofficial-vmware-vcenter-operations-powershell-module/. Using this module, I was able to get all the data points for disk commands by virtual machine during the time period in questions. With a little where-object goodness we can find only those VMs with over 300 IOPS. Looking at the data before applying this filter, I noticed this value would be around 3x the average IO normally seen during this period of time. This isn’t really a good visualization for the amount of data, but it can give me what I need to be able to continue to troubleshoot:

[cc lang=”powershell”]
$startDate = Get-Date “9/27/2013 12:01 AM”
$endDate = Get-Date “9/27/2013 5:00 AM”
Get-Datacenter NestedLab | Get-VM |
Get-vCOpsResourceMetric -metricKey “virtualDisk:Aggregate of all instances|commandsAveraged_average” -startDate $startDate -endDate $endDate |
Select-Object Name, @{N=”Value”;E={[math]::round($_.value,0)}}, Date |
Where-Object {$_.Value -gt 300}
[/cc]

In my case, this method didn’t give me an obvious answer to my problems. However, it did give me a smaller list of virtual machines to focus on.

This entry was posted in Scripting, Virtualization. Bookmark the permalink.

One Response to Getting data out of vCOps

  1. Pingback: The Internet Fishing Trawler: Monitoring Edition | Bede Carroll

Leave a Reply

Your email address will not be published. Required fields are marked *

*

Notify me of followup comments via e-mail. You can also subscribe without commenting.