MultiCloud Classroom notes 23/Nov/2024

Cloudwatch logs

Sending logs to cloudwatch

  • Scenario: Send website logs that is hosted on nginx to cloudwatch logs
  • Setting up the website
sudo apt update
sudo apt install nginx unzip -y
cd /tmp
wget https://www.free-css.com/assets/files/free-css-templates/download/page296/listrace.zip
unzip listrace.zip
sudo mv listrace-v1.0/ /var/www/html/
sudo mv /var/www/html/listrace-v1.0  /var/www/html/lists


* AWS Cloudwatch logs are stored in log groups which will have streams
* Steps:
* Install cloudwatch agent on ec2
wget https://amazoncloudwatch-agent.s3.amazonaws.com/ubuntu/amd64/latest/amazon-cloudwatch-agent.deb
sudo dpkg -i amazon-cloudwatch-agent.deb

* give necessary permissions to ec2 to send logs (cloudwatchlogsfullaccess)
* confgure agent to send specific logs

How to do the similar stuff in Azure


* Create a log analytics worksapce
* INstall azure monitoring agent
* Configure azure monitoring agent to send logs to log analytics workspace

Published
Categorized as Uncategorized Tagged

By continuous learner

devops & cloud enthusiastic learner

Leave a ReplyCancel reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Please turn AdBlock off
Animated Social Media Icons by Acurax Responsive Web Designing Company

Discover more from Direct DevOps from Quality Thought

Subscribe now to keep reading and get access to the full archive.

Continue reading

Exit mobile version
%%footer%%