This is a cached version of the website at

It reflects the content as downloaded on 2013-06-10.

Paessler is not responsible for the content of this page.

Recently I have been setting up a new PRTG monitoring environment for a customer, and I really wanted to get some useful stats out of the HP P2000 SAN that they have.  I initially started looking into whether SNMP might be a good option, as it would then be relatively easy to extract the information I needed from the SAN.  Unfortunately I couldn’t extract the information I needed via SNMP.

I wanted to be able to gather information like IOPS, CPU usage etc.  I then noticed as part of the HP Performance Monitoring Tool, that it comes with a command line tool called msacli.exe, which you can pass commands to which then outputs the result into XML format.  This was perfect, so I installed the HP Performance Monitoring tool onto my monitoring Server.  I then started  playing around with PowerShell, (which I love at the moment BTW!) so that I could parse the results I needed back into my PRTG monitor.

So I initially wanted to get the stats from one of the Controllers which you can do from the msacli command line tool:

This will output the controller stats to an XML file located at C:\HP P2000 MSA Performance Tool\Output.

I then built a PowerShell script based on this XML file, so that I could add the script as a Exe/Script Advanced sensor.  This script can be found below:

This then within the PRTG Network Monitor console, should show something like this:


Stay tuned for further updates, as I share further PowerShell scripts for which to monitor your P2000 SAN with PRTG Network Monitor!

11 comments so far

Add Your Comment
  1. Thanks for posting this. I’ve been trying to figure his out for a while. Any updates or new tools?

    • I am glad that this has been useful for you.

      I will be posting some more updates soon on monitoring HP P2000 SANs. They all make use of msacli.exe so the scripts are all very similar to the current script that I have shared.

  2. Thanks for posting this Robert. I have a question though, is there a particular firmware version that has to be installed on the controllers to get this working? I could not get it to recognize the “show controller-statistic” command.


    • I am not too sure to be honest. I am presuming that if you read the pre-requisites for the HP P2000 Monitoring Tool, that you should be able to find out the minimum firmware required in order for this tool to run. So if you run the command manually rather than using the script, do you not get any output? I also noticed in your comment, that you are using “show controller-statistic” – this will not work as the command has to be exact: “show controller-statistics”. So try executing the following command: msacli.exe -ip -user admin -pass password -cmd “show controller-statistics”

      This should product an XML file from within the command prompt window. Let me know if that works or not (don’t forget to change the IP and the username and password above!).

  3. You should be able to SSH in to your p2000 and run the command manually to see if it works.

    Also – I had to eidt the posted code to get it to work for me. For my p2000, I had to add the index of the OBJECT array otherwise powershell could not parse the XML and it would error .

    I changed line 6 from

    Not sure if this is something related to my specific firmware or not , I have TS240P003

    • I had to do the same. I believe its because you have 2 controllers.

      Object[0] gets you stats on controller 1
      object[1] gets controller 2

      • That makes sense – the HP Controller I was coding against, was only using one controller (in an active/passive formation).

        Thanks for pointing this out, I will amend my code for this.

      • Actually, what version of Powershell are you using? I am using the latest release that comes with Server 2012/Windows 8 (Powershell V3)

        You can find your version by entering this at the command line:
        get-host|Select-Object version

  4. Great input! Thanks.
    Waiting for more to come :-)

  5. Highly descriptive post, I loved that a lot.
    Will there be a part 2?

  6. Thanks for sharing your knowledge with the PRTG community!

+ 1 = three