Can I see EC2 Instance Monitoring Metrics in Cloudwatch by adding values in Parameter Store?

0

By adding a specific value in Parameter Store in AWS System Manager Is there any way to add the below EC2 basic monitoring metrics?

CPUUtilzation, StatusCheckFailed, StatusCheckFailed_Instance, StatusCheckFailed_System NetworkIn, NetworkOut, NetworkPacketsIn, NetworkPacketsOut EBSReadBytes, EBSReadOps, EBSWriteBytes, EBSWriteOps

{
  "agent": {
    "metrics_collection_interval": 60,
    "region": "ap-northeast-2",
    "run_as_user": "root"
  },
  "logs": {
    "logs_collected": {
      "files": {
        "collect_list": [
          {
            "file_path": "/var/log/syslog",
            "log_group_name": "DevSystemLogs",
            "log_stream_name": "syslog"
          },
          {
            "file_path": "/var/log/auth.log",
            "log_group_name": "DevSystemLogs",
            "log_stream_name": "authlog"
          },
          {
            "file_path": "/var/log/cmdlog.log",
            "log_group_name": "DevSystemLogs",
            "log_stream_name": "cmdlog"
          }
        ]
      }
    }
  },
  "metrics": {
    "namespace": "Dev/custom",
    "append_dimensions": {
      "ImageID": "${aws:ImageId}",
      "InstanceId": "${aws:InstanceId}",
      "InstanceType": "${aws:InstanceType}",
      "AutoScalingGroupName": "${aws:AutoScalingGroupName}"
    },
    "metrics_collected": {
          "cpu": {
            "resources": [
              "*"
            ],
            "measurement": [
            ],
            "totalcpu": true,
            "metrics_collection_interval": 10,
            "append_dimensions": {
              "osw_test5": "osw_test5"
            }
          },
      "disk": {
        "measurement": [
          "used_percent"
        ],
        "metrics_collection_interval": 60,
        "resources": [
          "*"
        ]
      },
      "mem": {
        "measurement": [
          "mem_used_percent"
        ],
        "metrics_collection_interval": 60
      }
    }
  }
}

I would like to see the above metrics when I clicked all metrics in Cloudwatch and clicked Custom Namespace

1개 답변
0

Hopefully I understand your question, but you can store Cloudwatch Configuration in AWS Systems Manager (SSM) Parameter Store and use SSM to configure the CloudWatch Agent to push the metrics and logs you desire to CloudWatch. You will want to use the AmazonCloudWatch-ManageAgent run command document. Documentation and workshops below demonstrate that process. Hope this helps.

https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/install-CloudWatch-Agent-on-EC2-Instance-fleet.html#start-CloudWatch-Agent-EC2-fleet

https://www.wellarchitectedlabs.com/security/200_labs/200_remote_configuration_installation_and_viewing_cloudwatch_logs/4_start_cw_agent/

https://catalog.us-east-1.prod.workshops.aws/workshops/a8e9c6a6-0ba9-48a7-a90d-378a440ab8ba/en-US/300-ssm/330-state-manager/331-using-state-manager

profile pictureAWS
aaron_l
답변함 2년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠