This blog is being written as a companion to my previous blog on Automated EMC VMAX Capacity Reporting
In recent times, we’re asked to develop scripts to capture performance metrics from EMC VMAX storage. There is a ‘symstat’ command with many attributes to capture performance metrics information from the array. But this command was not fulfilling all our requirements. While exploring various options and consultation with EMC support / community we decided to try Unisphere / RESTAPI.
So far I was using Perl as THE LANGUAGE to talk to my storage arrays. But I was forced to switch over to Python which works best with REST API / JSON. Additionally, there are lots of code out there on RESTAPI written in Python. So it is easy to ‘get inspired’ by those codes and write customized code for our requirements. So this would make me yet another ‘Pythonistas’ 🙂
This is my first ever Python (version 2.7 on GNU/Debian Linux) script to capture EMC VMAX Performance Metrics retrieved from Unisphere for VMAX (version 8.2) via RESTAPI. I’ve referred this Python script to develop custom script to suit our requirements. Many thanks to Matt Cowger (mcowger) for sharing the script in Github.
There are plenty of metrics that can be captured using this script but I’ve written a simple code for demo purpose to print few metrics in CSV format which can be either imbibed by excel for further reporting / charting or injected to MySQL DB to do many stuffs…
Here is the sample + cropped output for reference. In the below table timestamp (column B) is in epoch format which is converted to MYSQL datetime format via INSERT query
P.S: I’ve changed VMAX serial number for various factors
If interested, please reach out to me to get these Python scripts.
Image Courtesy: https://www.emc.com
References: https://github.com/mcowger/randompython/blob/master/symmREST.py
Thanks for stopping by… Please leave your comments / suggestions.
Hello vinusumi,
I am interested on getting those scripts, I am currently looking for a way to automate reports from unisphere.
To automate reports from unisphere we need to use REST API’s
Hi Vinay,
Please send me the scripts to my email. I am a newbie in scripting. If you can help with the steps to follow to use the script to generate report from unisphere using REST API, I will be grateful.
May I get the script ahmedhal@gmail.com
hi vinusumi,
iam interested to use this , can u please hlp me on this
Sure, what kind of support you’re looking for. We need to have scripting knowledge to use these scripts with customer permission to deploy the script
Hello Vinay
Port 2003 is for REST? I am unable to connect throught it via other server. Do we need to use SYMAPI server only?
Hi vinay ..
Can i get the script ? and i am actually looking for support to get training on multiple tasks related to emc vmax automation.can you help me out with this? you can reach me at @kanna.srikanth9@gmail.com. thanks
Could I get the script?
3milepond@gmail.com
Hi Jeff,
Sorry I saw your comment now. Do you still want this script?
Hey Mate,
May I request for the VMAX performance script so that we can get some automation done.
Hi Vinay,
Could you please mail me the vmax performance metrics to the below email id – parthiban.gv@gmail.com. thanks in advance
Hi Vinay,
That’s a great work you are doing. I am working on a similar project and your scripts would be a great help. Can you share the same.
girishslnk49@gmail.com