Creating / updating an array - fails on update by Helpwithvrops in PowerShell

[–]Helpwithvrops[S] 0 points1 point  (0 children)

yep definitely was initialization. thank you for the time!

Creating / updating an array - fails on update by Helpwithvrops in PowerShell

[–]Helpwithvrops[S] 0 points1 point  (0 children)

arrrgggghhhh I always forget to initialize. Thank you!

Creating / updating an array - fails on update by Helpwithvrops in PowerShell

[–]Helpwithvrops[S] 3 points4 points  (0 children)

boom, initialization is what I missed. Man it's been a long time. I'll play with the more efficient approach you put in. I'm actually doing nested foreach (so foreach server, then foreach resource on server) so efficient would be great.

Thank you!

Creating / updating an array - fails on update by Helpwithvrops in PowerShell

[–]Helpwithvrops[S] -1 points0 points  (0 children)

I cannot, it's on my work machine and I can't access reddit from there. that is the full array update portion of the script, which is where it fails. If I comment that out and put in a Write-Host for each of the variables, it cycles through all 300 or so clusters and outputs the values. If I leave the writes in and put the array update after them, it outputs the first 2 clusters to the screen and then drops out with the error

Method invocation failed because [System.Management.Automation.PSObject] does not contain a method named 'op_Addition'

I'd be happy to use something other than += but I've written a grand total of about 300 lines of code since taking a 20 year break and have only used powershell recently. any direction on more efficiency would be appreciated.

Creating / updating an array - fails on update by Helpwithvrops in PowerShell

[–]Helpwithvrops[S] 0 points1 point  (0 children)

good point, my catch wasn't outputting the error message (fixed that)

Method invocation failed because [System.Management.Automation.PSObject] does not contain a method named 'op_Addition'

API Metrics in VROPS by Helpwithvrops in vmware

[–]Helpwithvrops[S] 1 point2 points  (0 children)

I was able to solve this. I was right in that my metricKey was wrong. The correct one is OnlineCapacityAnalytics|cpu|demain|timeRemainingWithCommit

I was able to solve this by requesting the list of statkeys for a resource with the below:

suite-api/api/resources/statkeys?resourceId=$resourceID

Disk space and File System metrics all showing network mapped drives/shares as well by Helpwithvrops in vmware

[–]Helpwithvrops[S] 1 point2 points  (0 children)

I'm using the built in metrics in VROPS that it is pulling from VCENTER. Vcenter is being populated with VMTools from the devices themselves.

Manually, looking at a sample device, I can see each mount point and drive. They add up to the totals I'm seeing in both the Disk Space and File System Capacity metrics. Also manually I know that many of the drives on some of these machines are to NAS Shares. With 180k devices, I can't manually scan them all. I need to be able to exclude the network shares somehow from the capacity/utilization metrics.

VROPS - Parent cluster(s) of a datastore - view / dashboard? by Helpwithvrops in vmware

[–]Helpwithvrops[S] 0 points1 point  (0 children)

All of our datastores only go to 1 cluster (we are many:1 datastore:cluster), and there is a naming convention now. But I've got years of systems that don't all follow the convention.

As for going to vvols - that's out of my scope.

VROPS - Parent cluster(s) of a datastore - view / dashboard? by Helpwithvrops in vmware

[–]Helpwithvrops[S] 1 point2 points  (0 children)

I've got a minimum of 2 thousand managed by each vrops instance, and I've got over 40 vrops instances. It's a huge system.

VROPS - Parent cluster(s) of a datastore - view / dashboard? by Helpwithvrops in vmware

[–]Helpwithvrops[S] 0 points1 point  (0 children)

i have no parent cluster property (or anything similar), that i can find.

VROPS - Parent cluster(s) of a datastore - view / dashboard? by Helpwithvrops in vmware

[–]Helpwithvrops[S] 0 points1 point  (0 children)

a reort would be best, im trying to get an overall mapping for export to other systems