With this next post I provide a solution to track DRS rules over time in vRops, you can then use vRops to alert on any changes by defining custom symptoms / alerts!

Anyone that manages large vSphere environments knows how painful it can be to track DRS rule / group changes over time. During maintenance or incidents it is totally normal to disable or modify DRS rules and group memberships, unfortunately sometimes these can be forgotten at 3AM when people just want to go to bed…. putting the environment at risk!

So the script needs to be run on a schedule, when it executes it will connect to one or more vCenters using PowerCLI and pulls the deetz… then connects to vROPS, searches for each Cluster object and pushes in the custom metrics and properties in…

The script can be found here, with new posts I just stick it directly in GitHub

You will need to generate the credential files and place them within the \config directory (one for vRops and another for vCenter if the same account can’t be used.)

$cred = Get-Credential
$cred | Export-Clixml -Path "HOME-VC.xml"

Make sure to lookout at \Log\LogFile.log for the status / progress of the script. Once it’s complete check vRops for your new properties.

.\vCenterDRS2vROPSImporter.ps1 -vCenter 'vcsa.vMan.ch','vcsa-shed.vMan.ch' -creds 'HOME-VC' -vRopsAddress 'vRops.vMan.ch' -vRopsCreds 'vROPS' -ImportType 'Full'

I hope you find this helpful!

vMan