#!/bin/bash
diskarray=(`iostat -d |sed  '/^$/d' | sed -n '3,$p'|awk '{print $1}'`)
length=${#diskarray[@]}
printf "{\n"
printf  '\t'"\"data\":["
for ((i=0;i<$length;i++))
do
    printf '\n\t\t{'
    printf "\"{#DISK_NAME}\":\"${diskarray[$i]}\"}"
    if [ $i -lt $[$length-1] ];then
       printf ','
    fi
done
printf  "\n\t]\n"
printf "}\n"
