ECS RightSizing CloudWatch Dashboard 구성
5845 단어 cloudwatchcloudwatch
Dashboard Json
{
"widgets": [
{
"height": 9,
"width": 24,
"y": 15,
"x": 0,
"type": "log",
"properties": {
"query": "SOURCE '/perfomance 로그 경로 입력' | fields @message\n| filter Type=\"Task\"\n| filter @logStream like /FargateTelemetry/\n| stats latest(TaskDefinitionFamily) as TaskDefFamily, latest(TaskDefinitionRevision) as Rev, latest(ServiceName) as Service, latest(ClusterName) as Cluster, max(CpuReserved) as TaskCpuReserved, avg(CpuUtilized) as AvgCpuUtilized, concat(ceil(avg(CpuUtilized) * 100 / TaskCpuReserved),\" %\") as AvgCpuUtilizedPerc, max(CpuUtilized) as PeakCpuUtilized, concat(ceil(max(CpuUtilized) * 100 / TaskCpuReserved),\" %\") as PeakCpuUtilizedPerc, max(MemoryReserved) as TaskMemReserved, ceil(avg(MemoryUtilized)) as AvgMemUtilized, concat(ceil(avg(MemoryUtilized) * 100 / TaskMemReserved),\" %\") as AvgMemUtilizedPerc, max(MemoryUtilized) as PeakMemUtilized, concat(ceil(max(MemoryUtilized) * 100 / TaskMemReserved),\" %\") as PeakMemUtilizedPerc by TaskId\n| sort TaskDefFamily asc\n",
"stacked": false,
"title": "모든 Fargate 작업 구성 및 사용 세부 정보 (CPU 및 메모리)",
"view": "table"
}
},
{
"height": 3,
"width": 24,
"y": 0,
"x": 0,
"type": "log",
"properties": {
"query": "SOURCE '/perfomance 로그 경로 입력' | fields @message\n| filter Type=\"Task\"\n| filter @logStream like /FargateTelemetry/\n| stats count_distinct(TaskId) as TotalCountFargateTasks by bin(30m)",
"stacked": true,
"title": "Fargate 총 작업 수",
"view": "timeSeries"
}
},
{
"height": 6,
"width": 15,
"y": 3,
"x": 0,
"type": "log",
"properties": {
"query": "SOURCE '/perfomance 로그 경로 입력' | fields @message\n| filter Type=\"Task\"\n| filter @logStream like /FargateTelemetry/\n| stats latest(TaskDefinitionFamily) as TaskDefFamily, latest(ServiceName) as SvcName, concat(floor((max(CpuReserved) - avg(CpuUtilized)) * 100 / max(CpuReserved)), \" %\") as AvgCpuWastePercentage by TaskId\n| sort AvgCpuWastePercentage desc\n| limit 10",
"stacked": false,
"title": "CPU 최적화 Fargate 작업대상",
"view": "table"
}
},
{
"height": 6,
"width": 15,
"y": 9,
"x": 0,
"type": "log",
"properties": {
"query": "SOURCE '/perfomance 로그 경로 입력' | fields @message\n| filter Type=\"Task\"\n| filter @logStream like /FargateTelemetry/\n| stats latest(TaskDefinitionFamily) as TaskDefFamily, latest(ServiceName) as SvcName, concat(floor((max(MemoryReserved) - avg(MemoryUtilized)) * 100 / max(MemoryReserved)), \" %\") as AvgMemWastePercentage by TaskId\n| sort AvgMemWastePercentage desc\n| limit 10",
"stacked": false,
"title": "Memory 최적화 Fargate 작업대상",
"view": "table"
}
},
{
"height": 6,
"width": 9,
"y": 3,
"x": 15,
"type": "log",
"properties": {
"query": "SOURCE '/perfomance 로그 경로 입력' | fields @message\n| filter Type = \"Task\"\n| filter @logStream like /FargateTelemetry/\n| stats count_distinct(TaskId) as TotalTasks, avg(CpuReserved) * TotalTasks as TotalCPUReserved, avg(CpuUtilized) * TotalTasks as AvgCPUConsumed by bin(30m) \n",
"stacked": false,
"title": "CPU 예약 대 평균 사용량 (모든 Fargate 작업)",
"view": "timeSeries"
}
},
{
"height": 6,
"width": 9,
"y": 9,
"x": 15,
"type": "log",
"properties": {
"query": "SOURCE '/perfomance 로그 경로 입력' | fields @message\n| filter Type = \"Task\"\n| filter @logStream like /FargateTelemetry/\n| stats count_distinct(TaskId) as TotalTasks, avg(MemoryReserved) * TotalTasks as TotalMemReserved, avg(MemoryUtilized) * TotalTasks as AvgMemConsumed by bin(30m) \n",
"stacked": false,
"title": "예약 된 메모리 대 평균 사용량 (모든 Fargate 작업)",
"view": "timeSeries"
}
},
{
"height": 9,
"width": 24,
"y": 24,
"x": 0,
"type": "log",
"properties": {
"query": "SOURCE '/perfomance 로그 경로 입력' | fields @message\n| filter Type=\"Task\"\n| filter ispresent(ServiceName)\n| filter @logStream like /FargateTelemetry/\n| stats latest(TaskDefinitionFamily) as TaskDefFamily, latest(TaskDefinitionRevision) as Rev, latest(ClusterName) as Cluster, max(CpuReserved) as TaskCpuReserved, avg(CpuUtilized) as AvgCpuUtilized, concat(ceil(avg(CpuUtilized) * 100 / TaskCpuReserved),\" %\") as AvgCpuUtilizedPerc, max(CpuUtilized) as PeakCpuUtilized, concat(ceil(max(CpuUtilized) * 100 / TaskCpuReserved),\" %\") as PeakCpuUtilizedPerc, (max(MemoryReserved)) as TaskMemReserved, ceil(avg(MemoryUtilized)) as AvgMemUtilized, concat(ceil(avg(MemoryUtilized) * 100 / TaskMemReserved),\" %\") as AvgMemUtilizedPerc, max(MemoryUtilized) as PeakMemUtilized, concat(ceil(max(MemoryUtilized) * 100 / TaskMemReserved),\" %\") as PeakMemUtilizedPerc by ServiceName as Service\n| sort ServiceName asc\n",
"stacked": false,
"title": "모든 Fargate 서비스 구성 및 사용 세부 정보 (CPU 및 메모리)",
"view": "table"
}
}
]
}
View
{
"widgets": [
{
"height": 9,
"width": 24,
"y": 15,
"x": 0,
"type": "log",
"properties": {
"query": "SOURCE '/perfomance 로그 경로 입력' | fields @message\n| filter Type=\"Task\"\n| filter @logStream like /FargateTelemetry/\n| stats latest(TaskDefinitionFamily) as TaskDefFamily, latest(TaskDefinitionRevision) as Rev, latest(ServiceName) as Service, latest(ClusterName) as Cluster, max(CpuReserved) as TaskCpuReserved, avg(CpuUtilized) as AvgCpuUtilized, concat(ceil(avg(CpuUtilized) * 100 / TaskCpuReserved),\" %\") as AvgCpuUtilizedPerc, max(CpuUtilized) as PeakCpuUtilized, concat(ceil(max(CpuUtilized) * 100 / TaskCpuReserved),\" %\") as PeakCpuUtilizedPerc, max(MemoryReserved) as TaskMemReserved, ceil(avg(MemoryUtilized)) as AvgMemUtilized, concat(ceil(avg(MemoryUtilized) * 100 / TaskMemReserved),\" %\") as AvgMemUtilizedPerc, max(MemoryUtilized) as PeakMemUtilized, concat(ceil(max(MemoryUtilized) * 100 / TaskMemReserved),\" %\") as PeakMemUtilizedPerc by TaskId\n| sort TaskDefFamily asc\n",
"stacked": false,
"title": "모든 Fargate 작업 구성 및 사용 세부 정보 (CPU 및 메모리)",
"view": "table"
}
},
{
"height": 3,
"width": 24,
"y": 0,
"x": 0,
"type": "log",
"properties": {
"query": "SOURCE '/perfomance 로그 경로 입력' | fields @message\n| filter Type=\"Task\"\n| filter @logStream like /FargateTelemetry/\n| stats count_distinct(TaskId) as TotalCountFargateTasks by bin(30m)",
"stacked": true,
"title": "Fargate 총 작업 수",
"view": "timeSeries"
}
},
{
"height": 6,
"width": 15,
"y": 3,
"x": 0,
"type": "log",
"properties": {
"query": "SOURCE '/perfomance 로그 경로 입력' | fields @message\n| filter Type=\"Task\"\n| filter @logStream like /FargateTelemetry/\n| stats latest(TaskDefinitionFamily) as TaskDefFamily, latest(ServiceName) as SvcName, concat(floor((max(CpuReserved) - avg(CpuUtilized)) * 100 / max(CpuReserved)), \" %\") as AvgCpuWastePercentage by TaskId\n| sort AvgCpuWastePercentage desc\n| limit 10",
"stacked": false,
"title": "CPU 최적화 Fargate 작업대상",
"view": "table"
}
},
{
"height": 6,
"width": 15,
"y": 9,
"x": 0,
"type": "log",
"properties": {
"query": "SOURCE '/perfomance 로그 경로 입력' | fields @message\n| filter Type=\"Task\"\n| filter @logStream like /FargateTelemetry/\n| stats latest(TaskDefinitionFamily) as TaskDefFamily, latest(ServiceName) as SvcName, concat(floor((max(MemoryReserved) - avg(MemoryUtilized)) * 100 / max(MemoryReserved)), \" %\") as AvgMemWastePercentage by TaskId\n| sort AvgMemWastePercentage desc\n| limit 10",
"stacked": false,
"title": "Memory 최적화 Fargate 작업대상",
"view": "table"
}
},
{
"height": 6,
"width": 9,
"y": 3,
"x": 15,
"type": "log",
"properties": {
"query": "SOURCE '/perfomance 로그 경로 입력' | fields @message\n| filter Type = \"Task\"\n| filter @logStream like /FargateTelemetry/\n| stats count_distinct(TaskId) as TotalTasks, avg(CpuReserved) * TotalTasks as TotalCPUReserved, avg(CpuUtilized) * TotalTasks as AvgCPUConsumed by bin(30m) \n",
"stacked": false,
"title": "CPU 예약 대 평균 사용량 (모든 Fargate 작업)",
"view": "timeSeries"
}
},
{
"height": 6,
"width": 9,
"y": 9,
"x": 15,
"type": "log",
"properties": {
"query": "SOURCE '/perfomance 로그 경로 입력' | fields @message\n| filter Type = \"Task\"\n| filter @logStream like /FargateTelemetry/\n| stats count_distinct(TaskId) as TotalTasks, avg(MemoryReserved) * TotalTasks as TotalMemReserved, avg(MemoryUtilized) * TotalTasks as AvgMemConsumed by bin(30m) \n",
"stacked": false,
"title": "예약 된 메모리 대 평균 사용량 (모든 Fargate 작업)",
"view": "timeSeries"
}
},
{
"height": 9,
"width": 24,
"y": 24,
"x": 0,
"type": "log",
"properties": {
"query": "SOURCE '/perfomance 로그 경로 입력' | fields @message\n| filter Type=\"Task\"\n| filter ispresent(ServiceName)\n| filter @logStream like /FargateTelemetry/\n| stats latest(TaskDefinitionFamily) as TaskDefFamily, latest(TaskDefinitionRevision) as Rev, latest(ClusterName) as Cluster, max(CpuReserved) as TaskCpuReserved, avg(CpuUtilized) as AvgCpuUtilized, concat(ceil(avg(CpuUtilized) * 100 / TaskCpuReserved),\" %\") as AvgCpuUtilizedPerc, max(CpuUtilized) as PeakCpuUtilized, concat(ceil(max(CpuUtilized) * 100 / TaskCpuReserved),\" %\") as PeakCpuUtilizedPerc, (max(MemoryReserved)) as TaskMemReserved, ceil(avg(MemoryUtilized)) as AvgMemUtilized, concat(ceil(avg(MemoryUtilized) * 100 / TaskMemReserved),\" %\") as AvgMemUtilizedPerc, max(MemoryUtilized) as PeakMemUtilized, concat(ceil(max(MemoryUtilized) * 100 / TaskMemReserved),\" %\") as PeakMemUtilizedPerc by ServiceName as Service\n| sort ServiceName asc\n",
"stacked": false,
"title": "모든 Fargate 서비스 구성 및 사용 세부 정보 (CPU 및 메모리)",
"view": "table"
}
}
]
}
Author And Source
이 문제에 관하여(ECS RightSizing CloudWatch Dashboard 구성), 우리는 이곳에서 더 많은 자료를 발견하고 링크를 클릭하여 보았다 https://velog.io/@enosoup/ECS-RightSizing-CloudWatch-Dashboard-구성저자 귀속: 원작자 정보가 원작자 URL에 포함되어 있으며 저작권은 원작자 소유입니다.
우수한 개발자 콘텐츠 발견에 전념 (Collection and Share based on the CC Protocol.)