CloudWatchのデータ列を取得する

コマンド(awscli)

aws cloudwatch get-metric-statistics \
--namespace "Pi" \
--metric-name "raspberry_pi_temperature" \
--dimensions "Name=Host,Value=pi" \
# must be in ISO 8601 UTC format (e.g., 2014-09-03T23:00:00Z).
--start-time "2016-03-07T16:00:00.000Z" \
--end-time "2016-03-08T08:00:00.000Z" \
--statistics "Average" \
--period 3600

出力

{
    "Datapoints": [
        {
            "Timestamp": "2016-03-07T16:00:00Z",
            "Average": 18.062250000000006,
            "Unit": "None"
        },
        {
            "Timestamp": "2016-03-08T01:00:00Z",
            "Average": 19.482033333333327,
            "Unit": "None"
        },
...

    ],
    "Label": "raspberry_pi_temperature"
}

参考

get-metric-statistics — AWS CLI 1.10.10 Command Reference