AWS Certified Advanced Networking – Specialty ANS-C00 – Question334

A user is having data generated randomly based on a certain event. The user wants to upload that data to CloudWatch. It may happen that event may not have data generated for some period due to randomness.
Which of the below mentioned options is a recommended option for this case?

A.
For the period when there is no data, the user should not send the data at all
B. The user must upload the data to CloudWatch as having no data for some period will cause an error at CloudWatch monitoring
C. For the period when there is no data the user should send the value as 0
D. For the period when there is no data the user should send a blank value

Correct Answer: C

Explanation:

Explanation:
AWS CloudWatch supports the custom metrics. The user can always capture the custom data and upload the data to CloudWatch using CLI or APIs. When the user data is more random and not generated at regular intervals, there can be a period which has no associated data. The user can either publish the zero (0) value for that period or not publish the data at all. It is recommended that the user should publish zero instead of no value to monitor the health of the application. This is helpful in an alarm as well as in the generation of the sample data count.
Reference: http://docs.aws.amazon.com/AmazonCloudWatch/latest/DeveloperGuide/publishingMetrics.html