MSA Storage
cancel
Showing results for 
Search instead for 
Did you mean: 

Scripting for faulty drive check

 
Debasish2
Occasional Contributor

Scripting for faulty drive check

I have 10 HP MSA P2000 G3 ARRAY.

I am monitoring these arrays everyday. Everyday I have to login to this array and check the enclosures. Its taking so much time through GUI.

So I want to know that a single script in which  whenever I want I can run the scripts and get the results within a minute.

Can you give me any example like this so that i can make a script for these 10 Arrays.

IPs are 1.2.3.4, 2.3.4.5 like this 

user id : abcd

pw: abcdef

Can you please suggest me a good script so that I can prepare a script.

Thanks & Regards
Debasish Bishoyi
5 REPLIES 5
Torsten.
Acclaimed Contributor

Re: Scripting for faulty drive check

Why not let the array send a snmp trap and/or an email?

You may also consider to use Insight RS for monitoring.


Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!   
Debasish2
Occasional Contributor

Re: Scripting for faulty drive check

Actually I want to write a Script for these HP arrays.

these are located in Denmark, Belgium, johans BURG, Lachen etc.

How Can I write a script for this. So That I can get all the information quickly.

Basically i need this for health check of the storage box.

Can You please assist me on this.

Thanks & Regards
Debasish Bishoyi
HPSDMike
HPE Pro

Re: Scripting for faulty drive check

Hello Debasish,

I'm sorry, I don't have a ready made script to do this. However, the user manual, found at http://h20564.www2.hpe.com/hpsc/doc/public/display?docId=emr_na-c02520779 , has examples and instructions for interacting with the array via scripts. I would suggest consulting that information and building a script that meets your needs. 

As a down and dirty script, I would say that you could drop plink.exe into a directory and write a crude batch file that has an entry for each of your MSA's to do the following. Then you could just review the healthcheck.txt file each time for a consolidated view. 

=======

del healthcheck.txt

plink -ssh manage@systemipaddress -pw systempassword set cli-parameters console;show system >> healthcheck.txt

plink -ssh manage@nextsystemipaddress -pw nextsystempassword set cli-parameters console;show system >> healthcheck.txt

=======

 



I work for HPE. The comments in this post are my own and do not represent an official reply from the company. No warranty or guarantees of any kind are expressed in my reply.

Accept or Kudo

HPEStorageGuy
Neighborhood Admin

Re: Scripting for faulty drive check

Dogpiling on to what @HPSDMike said:

Definitely get our CLI guide; there is an example of how to create a script:  The interesting part of creating a script is choosing the details you want to know about. For example:

  • For a good overview of the system:  show system   (review health and health reason)
  • For firmware versions:  show versions  (make sure you are on the latest released firmware versions)
  • For details on your RAID sets:  show vdisks   (review Status  and Health )
  • For enclosure information:  show enclosures   (review health and health reason)
  • For details on disks:  show disks   (review How UsedHealth  and Health Reason )

There are a whole host of other details you may want to monitor depending on your needs:  Hosts, Mappings, Power supplies, Fans, etc … 

My MSA R&D Manager recommends the API/XML version of output in the script rather than the console output which may change.  Also as mentioned previously, another option you should explore is the MSA alerts. Using either SNMP or SMTP.  Using SMTP you can have the array email you when a change in status is detected.  At this point all you would need to do is periodically make sure that the alerting mechanism is still functioning.. 

HPE does not provide scripts. Hopefully with the information provided you can write your own or maybe another customer who has written their own scripts could share theirs with you.

HPSDMike
HPE Pro

Re: Scripting for faulty drive check

I stumbled upon this today. May be worth a look. I haven't had a chance to try it.

https://github.com/YaroslavEremin/HP-MSA-P2000/blob/master/Send-P2000DisksReport.ps1 

 



I work for HPE. The comments in this post are my own and do not represent an official reply from the company. No warranty or guarantees of any kind are expressed in my reply.

Accept or Kudo