Start a Conversation

Unsolved

This post is more than 5 years old

9911

January 3rd, 2012 00:00

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

3 Attachments

5 Practitioner

 • 

274.2K Posts

January 3rd, 2012 02:00

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?

January 3rd, 2012 23:00

"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.

5 Practitioner

 • 

274.2K Posts

January 4th, 2012 01:00

User error. As always...

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

5 Practitioner

 • 

274.2K Posts

February 17th, 2012 14:00

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

February 21st, 2012 09:00

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

3 Posts

March 21st, 2012 10:00

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

3 Posts

March 21st, 2012 13:00

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.

61 Posts

March 21st, 2012 13:00

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

1 Message

May 1st, 2012 12:00

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?

5 Practitioner

 • 

274.2K Posts

May 15th, 2012 00:00

One more tip that I noticed yesterday during setup of the scripts. If you are trying to get this to run outside of the US and you get a date/time error, make sure you time zones are set up correctly, and if you are still getting the error, make sure that you are using the US-English date/time format on the host you are using to post the data from.

87 Posts

May 25th, 2012 14:00

Clinton,

are these scripts the basis for the EMC VNX Connector which will provide VNX storage metrics within VMware vCenter Operations?

John


May 29th, 2012 13:00

John,

Short answer here, is no.  These scripts provide some great functionality in the short term, but the VNX connector on release will be a fully supported vCOps plugin rewritten to be native to vCOps.  These scripts leverage vCOps open interface and a dedicated collection platform to get stats into vCOps.

June 1st, 2012 11:00

I get this error below when I run this command, ".\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".

ERROR:


C:\scripts\emc\ps_vcops_httpost.ps1 : Cannot bind argument to parameter 'InputObject' because it is null.

At C:\scripts\emc\get_unified_block_perf.ps1:647 char:38

+             $finalOut | .\ps_vcops_httpost.ps1 <<<<  -devicetype "ps-emc-unified-block"  -vcopsuser $vcopsuser -vcops

pass "$vcopspass" -protocol $protocol -vcopsip $vcopsip -devicename $devicename -resourcedescription $resourcedescripti

on -identifiers $identifiers -post }

    + CategoryInfo          : InvalidData: (:) [ps_vcops_httpost.ps1], ParameterBindingValidationException

    + FullyQualifiedErrorId : ParameterArgumentValidati"color: #494848; font-family: Verdana, Arial; font-size: 12px; background-color: #fefefe;">

61 Posts

June 1st, 2012 13:00

Doesn't look like you replaced 'spaip' and 'sbpip' with the IP addresses of your SPs....

June 5th, 2012 06:00

Here is the command I'm running when I get the error.  I have the IP's listed.

.\get_unified_block_perf.ps1 -username XXXXX -password XXXXX -scope 0 -spaip 10.6.4.10 -spbip 10.6.4.11 -vcopsip 10.6.2.226 -protocol https -vcopsuser XXXXX -vcopspass XXXXX  -devicename "ADCSAN401" -resourcedescription "ADC EMC CX4" -showluns -showdisks -showrgs -showpooltiers  -showpooltierrgs -showpools -showarraysummary -post -timeout 180

No Events found!

Top