title: Monitoring EC2 disk metrics using aws mon scripts
body: <p>I am using <a href="http://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/mon-scripts.html" rel="nofollow">aws mon scripts</a> for monitoring EC2 instances using following script :</p>
  
  <pre><code>#!/bin/bash
  a="$(df | grep /dev/ | awk {'print $1'})"
  IFS=' ' read -r -a array &lt;&lt;&lt; $a
  #echo "${array[0]}"
  for element in "${array[@]}"
  do
  /opt/aws-scripts-mon/mon-put-instance-data.pl --mem-util --disk-space-util  --swap-util --disk-path="$element" --aws-credential-file=/opt/aws-scripts-mon/awscreds.template
  done
  </code></pre>
  
  <p>Issue is it shows udev in cloudwatch for few machines instead of disk xvda1. Also,when I run this shell script in debug mode, it is compiled as xvda1 but passed to cloudwatch as udev.</p>