phpoffice/phpspreadsheet

phpoffice/phpspreadsheet is a successor of phpExcel. We recently developed an automated solution to pull all the backup success rate reports from Dell EMC Data Protection Advisor (DPA). The portal which displays the report was good but not enough to use that information further like sharing the reports, pivoting etc..

After trying several methods, found this library to be very useful. There aren’t many examples available on the internet to retrieve data from MySQL and write to XLSX file. Hope this blog might be helpful who would like to use this library for creating XLSX files. Fear not, it doesn’t throw errors while opening this file in MS Office Excel

Advertisements

VMAX3 Snapshot Aging Report

Data Storage cleanup/reclaim is similar to how we manage “kinds of stuff” in our homes. We think what to keep and not to after taking the holistic decision. Time & Value will decide what is to be discarded in near future…

An All-Flash Storage array (AFA’s) gives the best performance and greater value to the business. But every GB of All-Flash Storage is at least 3 times costlier than that of mechanical drives. It is critical to perform frequent clean up of these kinds of arrays to make sure that only the mission/business critical data and deserving information should reside on All-Flash array.

From the business perspective, the concerned team needs to do the regular drills to identify then inform IT Ops to discard stale or amassed data ASAP. This requires the team to do a logical distinction of information based on value or tasks, seek approvals from respective Business Unit Owners before proceeding to do clean up.

MySQL PHP Generating reports in PDF format

In continuation to my previous blog on charting epoch time series MySQL data using PHP. I started exploring generating better reports from the DB.

Inspired by the EMC SRM (M&R)  storage capacity reports in PDF format, I thought of doing similar kind of reports “in-house” which should be simple yet standard to be shared with customers. I would like to thank Sapan Kumar from EMC who thought me so many things about EMC’s SRM (M&R) custom reporting features.

We have the data in  MySQL DB and wanted to use the PDF module in PHP to generate reports. But which module is suitable and easy to use?

After rigorous testing with FPDF and DOMPDF, I decided to use FPDF (not sure why :p) and it produced nice reports indeed!

Please find sample reports screenshot produced below for reference. You could see the capacity reports of VNX and VMAX storage arrays.

2016-11-30-11_07_12-mremoteng-confcons-xml2016-11-30-11_03_57-mremoteng-confcons-xml

If interested, please reach out to me to get the PHP code. Thanks for stopping by… Please leave your comments / suggestions.

MYSQL PHP Charting epoch Time series data

I was writing PHP code to generate EMC VMAX performance reports / charts stored in MySQL DB. As we know that Unisphere REST API output performance metrics in epoch (13 digits) format (milliseconds). As an example, to draw a line chart for Frontend Director’s Read Response Time with X axis / Abscissa as epoch time. I’ve used below query to generate the datapoints to draw the chart using pChart

SELECT TIME(FROM_UNIXTIME(timstamp/1000)) as TIME, ROUND(AVG(perfval),2) as wrt FROM vmax_perf

where DAYOFMONTH(FROM_UNIXTIME(timstamp/1000)) = DAYOFMONTH(DATE_SUB(curdate(), INTERVAL 1 DAY))

and objname =’fe’ and perfparam =’ReadResponseTime’

group by HOUR(FROM_UNIXTIME(timstamp/1000))

Let me explain the above statement

TIME(FROM_UNIXTIME(timstamp/1000)) :: Extract Time from the epoch (13 digit) format in millisecond

ROUND(AVG(perfval),2) :: Average of Read Response Time per Hour rounded output to 2 digits after decimal point

DAYOFMONTH(FROM_UNIXTIME(timstamp/1000)) = DAYOFMONTH(DATE_SUB(curdate(), INTERVAL 1 DAY)) :: Extract day (ex. ’12’ from 12th Nov 2016 where current date is 13th Nov 2016) and display the data points

group by HOUR(FROM_UNIXTIME(timstamp/1000)) :: Print the datapoints for every hour

2016-11-13-14_27_22-10-76-6-62-remote-desktop-connection

If interested, please reach out to me to get the PHP code.

Stay Tuned for more updates on MySQL queries to generate charts for Daily, Weekly, Monthly and Quarterly performance reports / charts. Thanks for stopping by… Please leave your comments / suggestions.

Thanks for stopping by… Please leave your comments / suggestions.

EMC VMAX Storage Automated Performance Report

This blog is being written as a companion to my previous blog on Automated EMC VMAX Capacity Reporting

platform-vmax

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

2016-11-04-22_25_58-book1-excel

 

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.

IBM Storwize V7000 Snapshots Report

There was a requirement came to me to capture the snapshots details on an IBM Storwize V7000 storage. so, I wrote a simple PERL script to generate HTML report and send it to the stake holders and storage team via email. I’ve used the command ‘lsfcmap’ to list the snapshot details. Using PERL I’ve captured required output in desired order and format to suit our requirements.

Please find below report generated and sent over an email (split into two images for better readability)

SS1SS2

Script Caveats:

  1. Can run the script via scheduler or On-Demand
  2. Sorted based on descending order to list the oldest snapshots on top of the list
  3. Old reports are archived for future reference or troubleshooting purposes

Please let me know if you need the script to replicate for your V7K’s.

Fujitsu Eternus Storage Capacity Report Script

As mentioned in my previous post, here is the Fujitsu Eternus Storage Capacity Report script output.

We have used the below commands to get capacity information from Fujitsu arrays.

show disks

show raid-groups

show flexible-tier-pools

Using Perl, we have parsed the output to a HTML file which is being sent as a daily capacity utilization report. Please find the below report for reference.

Fujitsu