An organization is measuring the latency of an application every minute and storing data inside a file in the JSON format. The organization wants to send all latency data to AWS CloudWatch. How can the organization achieve this?
A.
The user has to parse the file before uploading data to CloudWatch
B.
It is not possible to upload the custom data to CloudWatch
C.
The user can supply the file as an input to the CloudWatch command
D.
The user can use the CloudWatch Import command to import data from the file to CloudWatch
Suggested Answer:C🗳️
AWS CloudWatch supports the custom metrics. The user can always capture the custom data and upload the data to CloudWatch using CLI or APIs. The user always has to include the namespace as part of the request. If the user wants to upload the custom data from a file, he can supply file name along with the parameter -- metric-data to command put-metric-data.
using the CloudWatch Import command to import data from the file to CloudWatch, is the correct approach for the organization to send the latency data in JSON format to CloudWatch.
To publish a custom metric to Amazon CloudWatch
The following example uses the put-metric-data command to publish a custom metric to Amazon CloudWatch:
aws cloudwatch put-metric-data --namespace "Usage Metrics" --metric-data file://metric.json
The values for the metric itself are stored in the JSON file, metric.json.
Here are the contents of that file:
[
{
"MetricName": "New Posts",
"Timestamp": "Wednesday, June 12, 2013 8:28:20 PM",
"Value": 0.50,
"Unit": "Count"
}
]
A voting comment increases the vote count for the chosen answer by one.
Upvoting a comment with a selected answer will also increase the vote count towards that answer by one.
So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.
e47cf49
6 months, 3 weeks agoalbert_kuo
1 year, 11 months agoalbert_kuo
1 year, 7 months agoawscertified
3 years, 5 months agokarmaah
3 years, 5 months ago