Skip to content
Menu
Cloud Gal 42
  • Home
Cloud Gal 42

QuickGuide: Amazon CloudWatch Setup

May 15, 2021May 26, 2021 by admin

Step 1 – Create Ubuntu EC2 instance and prep for CloudWatch Agent installation

sudo apt update
sudo apt install collectd -y
sudo apt install awscli -y
aws configure {configure region}

Step 2 – Attach IAM role to Ubuntu instance

IAM>Role>Choose EC2>Choose policiy CloudWatchFullAccess

Instances>Select instance>Actions>Security>Modify IAM role

Step 3 – Install CloudWatch Agent

sudo chown ubuntu:ubuntu -R /opt
cd /opt
mkdir software
cd software
wget https://s3.amazonaws.com/amazoncloudwatch-agent/ubuntu/amd64/latest/amazon-cloudwatch-agent.deb
sudo dpkg -i -E ./amazon-cloudwatch-agent.deb

Step 4 – Configure CloudWatch Agent

sudo /opt/aws/amazon-cloudwatch-agent/bin/amazon-cloudwatch-agent-config-wizard
  • Use default options 
  • Select Advanced for metrics config
  • Collect logs from /var/log/syslog, additional files no, SSM store no

Step 5 – Start the CloudWatch Agent for the first time

sudo /opt/aws/amazon-cloudwatch-agent/bin/amazon-cloudwatch-agent-ctl -a fetch-config -m ec2 -c file:/opt/aws/amazon-cloudwatch-agent/bin/config.json -s

Other agent commands:

To stop: sudo service amazon-cloudwatch-agent stop
To check status: sudo service amazon-cloudwatch-agent status
To start: sudo service amazon-cloudwatch-agent start

Agent logs:

cd /opt/aws/amazon-cloudwatch-agent/logs/
ls -al

Step 6 – Verify CloudWatch Setup

  • Navigate to CloudWatch on the AWS console
  • Click on Log groups under Logs
  • You should see “syslog” under Log group

Related

1 thought on “QuickGuide: Amazon CloudWatch Setup”

  1. Pingback: QuickGuide: Amazon Kinesis Setup – Cloud Gal 42

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Recent Posts

  • Role of AI/ML in Cybersecurity
  • QuickGuide: Security on OCI
  • The Cloud Management Plane
  • Secure Installation and Configuration of Virtualized Cloud Datacenters
  • Cloud Datacenter: Hardware-specific Security Configuration Requirements

Recent Comments

  • Rafael on Installing Debian on OCI
  • Jorge on Installing Debian on OCI
  • admin on Installing Debian on OCI
  • Andreas on Installing Debian on OCI
  • admin on Installing Debian on OCI

Archives

  • December 2022
  • February 2022
  • September 2021
  • July 2021
  • June 2021
  • May 2021
  • April 2021
  • February 2021
  • January 2021
  • November 2020
  • October 2020

Categories

  • aws
  • bcdr
  • cloud
  • cloudsecurity
  • compliance
  • informationsecurity
  • oracle
  • pci
  • QuickGuide
  • security
©2026 Cloud Gal 42 | Powered by WordPress and Superb Themes!