Amazon ECS サービス - Amazon CloudWatch

Amazon ECS サービス

次の例は、Amazon ECS サービス用の JSON 形式のコンポーネント設定を示しています。

{ "alarmMetrics":[ { "alarmMetricName":"CPUUtilization", "monitor":true }, { "alarmMetricName":"MemoryUtilization", "monitor":true }, { "alarmMetricName":"CpuUtilized", "monitor":true }, { "alarmMetricName":"MemoryUtilized", "monitor":true }, { "alarmMetricName":"NetworkRxBytes", "monitor":true }, { "alarmMetricName":"NetworkTxBytes", "monitor":true }, { "alarmMetricName":"RunningTaskCount", "monitor":true }, { "alarmMetricName":"PendingTaskCount", "monitor":true }, { "alarmMetricName":"StorageReadBytes", "monitor":true }, { "alarmMetricName":"StorageWriteBytes", "monitor":true } ], "logs":[ { "logGroupName":"/ecs/my-task-definition", "logType":"APPLICATION", "monitor":true } ], "subComponents":[ { "subComponentType":"AWS::ElasticLoadBalancing::LoadBalancer", "alarmMetrics":[ { "alarmMetricName":"HTTPCode_Backend_4XX", "monitor":true }, { "alarmMetricName":"HTTPCode_Backend_5XX", "monitor":true }, { "alarmMetricName":"Latency", "monitor":true }, { "alarmMetricName":"SurgeQueueLength", "monitor":true }, { "alarmMetricName":"UnHealthyHostCount", "monitor":true } ] }, { "subComponentType":"AWS::ElasticLoadBalancingV2::LoadBalancer", "alarmMetrics":[ { "alarmMetricName":"HTTPCode_Target_4XX_Count", "monitor":true }, { "alarmMetricName":"HTTPCode_Target_5XX_Count", "monitor":true }, { "alarmMetricName":"TargetResponseTime", "monitor":true }, { "alarmMetricName":"UnHealthyHostCount", "monitor":true } ] }, { "subComponentType":"AWS::EC2::Instance", "alarmMetrics":[ { "alarmMetricName":"CPUUtilization", "monitor":true }, { "alarmMetricName":"StatusCheckFailed", "monitor":true }, { "alarmMetricName":"disk_used_percent", "monitor":true }, { "alarmMetricName":"mem_used_percent", "monitor":true } ], "logs":[ { "logGroupName":"my_log_group", "logPath":"/mylog/path", "logType":"APPLICATION", "monitor":true } ], "processes" : [ { "processName" : "my_process", "alarmMetrics" : [ { "alarmMetricName" : "procstat cpu_usage", "monitor" : true }, { "alarmMetricName" : "procstat memory_rss", "monitor" : true } ] } ], "windowsEvents":[ { "logGroupName":"my_log_group_2", "eventName":"Application", "eventLevels":[ "ERROR", "WARNING", "CRITICAL" ], "monitor":true } ] }, { "subComponentType":"AWS::EC2::Volume", "alarmMetrics":[ { "alarmMetricName":"VolumeQueueLength", "monitor":"true" }, { "alarmMetricName":"VolumeThroughputPercentage", "monitor":"true" }, { "alarmMetricName":"BurstBalance", "monitor":"true" } ] } ] }
注記
  • AWS::EC2::Instance および AWS::EC2::VolumesubComponents セクションは、EC2 起動タイプで実行されている Amazon ECS にのみ適用されます。

  • subComponentsAWS::EC2::InstancewindowsEvents セクションは、Amazon EC2 インスタンスで実行されている Windows にのみ適用されます。