Sandip Patel

Let's move from "Have to" to "Want to"

Menu
  • Home
  • TECH CORNER
    • AWS
    • Networking
  • Videos
  • Expert Talk Delivered
  • Projects
  • Publications
  • About Me
Menu

Install Cloudwatch agent on on-premises Linux server

Posted on March 23, 2020October 7, 2020 by Sandip Patel

Configure AWS CLI in your machine using the following command:

sudo apt install awscli

Create access key and secret key of any user in your AWS account and provide it in your machine using below command:

aws configure

Now download and install cloudwatch agent on linux host:

  1. wget https://s3.amazonaws.com/amazoncloudwatch-agent/ubuntu/amd64/latest/amazon-cloudwatch-agent.deb
  2. sudo dpkg -i -E ./amazon-cloudwatch-agent.deb

Now, Create credentials file where ever you like as per below image:

Update the common-config.toml file for credentials file location using below command:

sudo vim /opt/aws/amazon-cloudwatch-agent/etc/common-config.toml

Here, I created credentials file in /home/jeel directory :


Create config file and store in SSM Parameter store with the name “AmazonCloudWatch-linux”

sudo /opt/aws/amazon-cloudwatch-agent/bin/amazon-cloudwatch-agent-config-wizard

Note: You can see that in AWS system manager in parameter store “AmazonCloudWatch-linux” is added

Now, Import the config, and start the agent

sudo /opt/aws/amazon-cloudwatch-agent/bin/amazon-cloudwatch-agent-ctl -a fetch-config -m onPremise -c ssm:AmazonCloudWatch-linux -s

OUTPUT:

You can see the cloudwatch metrics in your AWS console

Follow Me

              

AWS Re: invent 2021 at Las Vegas

Achievements & Events

Faculty- Ambassador
Best Paper Presentation Award
AWS Academy Success Story on AWS official Blog
AWS Expert Talk 2020
USA-Conference
Paper Presentation
Conference-Team
AWS Expert Talk by IEEE 2020

RSS Recent Announcements

  • AWS Fargate for Amazon Elastic Kubernetes Service is now available in the Amazon Web Services China Beijing and Ningxia Regions June 24, 2022
  • Amazon EC2 Auto Scaling announces increased Auto Scaling group default limit per account June 24, 2022
  • Amazon EC2 G5 instances now available in additional regions June 23, 2022
  • Amazon EC2 C7g instances powered by AWS Graviton3 processors now available in US East (Ohio) and Europe (Ireland) June 23, 2022
  • Amazon Connect Wisdom now enables you to integrate agent assistance capabilities into custom agent applications June 23, 2022

Recent Posts

  • Deployment of Website Using AWS CICD pipeline & Fargate
  • Install terraform on ubuntu and Create EC2 instance on AWS using terraform script
  • Install Cloudwatch agent on on-premises Windows server
  • Install Cloudwatch agent on on-premises Linux server
  • Deploy Flask website using AWS CLI with AWS Lambda, AWS API Gateway and Zappa
March 2020
S M T W T F S
1234567
891011121314
15161718192021
22232425262728
293031  
« Feb   Mar »
web counter
©2022 Sandip Patel | WordPress Theme by SuperbThemes