You can use the GetMetricData API to retrieve as many as 500 different metrics in a single request, with a total of as many as 100,800 data points.
但应该注意的是,数据点越老,分辨率越低。AWS不存储所有点。只有“新”数据将以原始分辨率存储
Data points that are initially published with a shorter period are aggregated together for long-term storage. For example, if you collect data using a period of 1 minute, the data remains available for 15 days with 1-minute resolution. After 15 days, this data is still available, but is aggregated and retrievable only with a resolution of 5 minutes.
Although you can publish data points with time stamps as granular as one-thousandth of a second, CloudWatch aggregates the data to a minimum granularity of 1 second.
CloudWatch不存储使用PutMetricData发布的原始值,它只存储聚合。您可以获得的最小粒度为1秒,最晚为3小时
如果您需要访问原始值,可以使用嵌入度量格式的CloudWatch日志来发布度量:https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch_Embedded_Metric_Format.html
这样,CloudWatch日志将创建您的自定义指标,而这些指标仍然只有聚合。您可以将其用于报警和仪表板
但是,您还可以查看原始的CloudWatch日志条目,查看发布的内容
您引用的统计信息是使用get_metric_statistics获得的。但是,要获得实际数据点,您应该查看get_metric_data:
但应该注意的是,数据点越老,分辨率越低。AWS不存储所有点。只有“新”数据将以原始分辨率存储
聚合更新
也来自docs:
相关问题 更多 >
编程相关推荐