0

I have an application publishing a custom cloudwatch metric using boto's put_metric_data. The metric shows the number of tasks waiting in a redis queue.

The 1-minute max shows '3', 1-minute min shows '0' and 1-minute average shows '1.5'.

It seems that the application is correctly setting the value to zero, but some other process is overwriting it with 3 at the same time, but I can't find this to stop it.

Is it possible to see logs for PutMetricData to diagnose where this value might be coming from?

Ger
  • 754
  • 1
  • 9
  • 33
  • If your application stops sending the data, does CloudWatch still report any metrics? Try that first to confirm that it isn't your application that is sending the unwanted data. – John Rotenstein Apr 30 '17 at 00:48
  • Yes, if I shut down my application the 1 minute average increases to 3 from 1.5, so there is maybe some other instance with the process running sending a PutMetricData value of 3. – Ger Apr 30 '17 at 10:39
  • Worst case, you could create a new Custom Metric and point your app to that, ignoring the other one. – John Rotenstein Apr 30 '17 at 12:39

1 Answers1

0

Normally, Amazon CloudTrail would be the ideal way to discover information about API calls being made to your AWS account. Unfortunately, PutMetricData is not captured in Amazon CloudTrail.

From Logging Amazon CloudWatch API Calls in AWS CloudTrail:

The CloudWatch GetMetricStatistics, ListMetrics, and PutMetricData API actions are not supported.

John Rotenstein
  • 241,921
  • 22
  • 380
  • 470