title: How to get the CloudWatch Agent and Metric Filters to Report Dimensions
body: <p><strong>Setup</strong></p>
  
  <p>CloudWatch Agent running on an EC2 instance reports audit logs to CloudWatch. Metric Filter in CloudWatch creates metrics for successful logins, failed logins, ect... when logs are reported. </p>
  
  <p><strong>Problem</strong></p>
  
  <p>Metrics created through the Metric Filter does not assign dimensions so I cant query CloudWatch to get a set of metric statistics by InstanceId. This would be extremely useful because I want to know the audit metrics per machine not per log group.</p>
  
  <p><strong>Comments</strong></p>
  
  <p>Attaching dimensions is pretty easy using the <code>put-metric-data</code> command. I am able to tag the metrics with the dimension for InstanceId and then retrieve only those metrics using <code>get-metric-statistics</code>. Is this kind of functionality not possible using the Metric Filters + CloudWatch Agent setup? What would be a possible workaround?</p>