Highlighted
clintonskitson
3 Argentium

Powershell Scripts for EMC Performance Statistics block/NAS (updated)

This thread is going to be the home of the updated Powershell scripts for collecting stats from the Unified/VNX EMC arrays.  The focus over the past months on improvements has been aimed at newer EMC technology such as Pools and FASTCache with an eye towards VMware vCenter Operations.  We have stats for Pools, Pool Tiers (raid groups that make up Pools), Raid Groups, Disks, and traditional LUNs.

The latest version includes some awesome new features mainly geared at providing richer, more standardized (modeled from Analyzer names), and more natively compatible with VMware vCOps (1.0.1 required for multiple arrays and relationships).  In addition it was mostly rewritten from a data calculation perspective, and gives the flexibility of choosing what level of granularity to collect on (whether purely SPs, or things like LUNs and disks).

There is also a goodie included (ps_navi_correlate_datastore_uuid) that is useful for vCOps and non-vCOps environments which does a correlation between Unified/VNX block LUN names and their VMware counterpart names.

# This command does a collection (NAS) and posts it to vCOps v5+ (UPDATED 05/29/12)

.\get_unified_nas_perf.ps1 -username nasadmin -password abc -csip controlstationip -devicename VNX06 -resourcedescription VNX06 -vcopsip vcopsip -protocol https -vcopsuser username -vcopspass pass -post

# This command does a collection (block) and posts it to vCOps v5+ (optional -eng engpass)

.\get_unified_block_perf.ps1 -username sysadmin -password sysadmin -scope 0 -spaip spaip -spbip spbip -vcopsip vcopsip -protocol https -vcopsuser xxx -vcopspass xxx  -devicename "CX4-1" -resourcedescription "EMC CX" -showluns -showdisks -showrgs -showpooltiers  -showpooltierrgs -showpools -showarraysummary -post -timeout 120

# Run this for correlation information, requires that you specify -vcserver, -vcusername, -vcpassword, or have logged into VC through PowerCLI already

.\ps_navi_correlate_datastore_uuid.ps1 -username sysadmin -password sysadmin -scope 0 -spip spip -devicename VNX01

# This command configures internal relationships between EMC resources, ie. LUN uses SPA, which controls Raidgroup x, and Disks xyz

.\get_unified_block_perf.ps1 -username sysadmin -password sysadmin -scope 0 -spaip spaip -spbip spbip -showluns -showdisks -showpools -showrgs -showpooltiers -showpooltierrgs -showarraysummary -showrelationships -devicename "CX4-1"  | .\ps_vcops_httpost.ps1  -vcopsip vcopsip -protocol https -vcopsuser xxx -vcopspass xxx -devicename "CX4-1"  -relationships -post

#This command configured relationship between LUN and VMware Datastore (awesome)

.\ps_navi_correlate_datastore_uuid.ps1 -username sysadmin -password sysadmin -scope 0 -spip spip -devicename "CX4-1" -silent | .\ps_vcops_httpost.ps1  -vcopsip vcopsip -protocol https -vcopsuser xxx -vcopspass xxx -devicename "CX4-1"  -relationships -post

Labels (2)
17 Replies
BasRaayman
1 Copper

Re: Powershell Scripts for EMC Performance Statistics block/NAS (updated)

Clint (and Matt), great work!

As an added tip, for folks new to the scripts, make sure you have PowerCli installed if you want to run the correlation information (it's sort of stated in the comment above, but I thought I'd write it down anyway), otherwise the script will cause a "fail" to show up when connecting to the vCenter.

Alls scripts work fine for me, except the one that configures the relationship between LUN and VMware datastore. If I don't actually post it, the output shows up. When I try to post it, I get the following:

Exception calling "send" with "1" argument(s): "The system cannot locate the resource specified.

"

At C:\scripts\ps_get_unified_stats\ps_vcops_httpost.ps1:177 char:96

+         if(!$post) { $arrParameters } else { if($showpost){ $arrParameters };$http_request.send <<<< ($tmpSend); }

    + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException

    + FullyQualifiedErrorId : ComMethodTargetInvocation

I'm guessing that there might be a problem in either a concat, or some of the special characters in the strings being posted, but that's just an guess. Any suggestions?

0 Kudos
clintonskitson
3 Argentium

Re: Powershell Scripts for EMC Performance Statistics block/NAS (updated)

"The system cannot locate the resource specified."

This error seems to be caused by an invalid vCOps IP or a web service that isn't running on the vCOps server.

0 Kudos
BasRaayman
1 Copper

Re: Powershell Scripts for EMC Performance Statistics block/NAS (updated)

User error. As always...

Sorry about keeping you up, but again thanks for your help in troubleshooting. Working like a charm now!

0 Kudos
jquinn2
1 Copper

Re: Powershell Scripts for EMC Performance Statistics block/NAS (updated)

So what was the resolution to the "The system cannot locate the resource specified." error? Apparently I am making the same user error. Thanks.

0 Kudos
clintonskitson
3 Argentium

Re: Powershell Scripts for EMC Performance Statistics block/NAS (updated)

The destination vCOps server specified with -vcopsip was not correct, or possibly the httpost adapter was not running.

0 Kudos
jcpowermac
1 Copper

Re: Powershell Scripts for EMC Performance Statistics block/NAS (updated)

Clinton,

Do you know if ps_navi_correlate_datastore_uuid.ps1 works with vSphere 5 and PPVE?  When I was troubleshooting it looks like "[array]$arrMILuns = $configStorageSystem.StorageDeviceInfo.MultipathInfo.Lun" is an empty array.

Thanks,

Joe

0 Kudos
mattcowger1
2 Iron

Re: Powershell Scripts for EMC Performance Statistics block/NAS (updated)

It works with my Lab with vSphere 5 and PP/VE.

0 Kudos
jcpowermac
1 Copper

Re: Powershell Scripts for EMC Performance Statistics block/NAS (updated)

Matt,

I would be interested to see what it is returning since even looking at the MOB I don't have a result.

mob-hostmultipathinfo.JPG

Also see this text in vSphere SDK reference.

http://pubs.vmware.com/vsphere-50/topic/com.vmware.wssdk.apiref.doc_50/vim.host.MultipathInfo.html

Storage devices using the native multipathing storage plugin will have an entry in this data object. Storage devices provided by a different storage plugin will not appear in the inventory represented by this data object.

0 Kudos
brianjbrady
1 Copper

Re: Powershell Scripts for EMC Performance Statistics block/NAS (updated)

EMC VNXe Support.

In your original post on setting this up you attached a ppt that stated that the VNXe was supported.

https://community.emc.com/thread/126637

I have been trying to get my VNXe to send metrics to my vCOps instance for 2 or 3 days now with no luck. From reading the scripts I only see the use of the navisphere cli, unless I missed something. What I understand about the VNXe system is that it does not support navi cli. Is there a tweak that I need to make to the powershell command to get this to work for me?

Help.

Thanks in advance.

................

BUMP

.................

Has anyone tried using this script with the VNXe?

Anyone?

0 Kudos