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

Preview
* 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

Preview

How to do the similar stuff in Azure

Preview
* 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 Reply

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

Please turn AdBlock off
Social Media Icons Powered by Acurax Web Design Company

Discover more from Direct DevOps from Quality Thought

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

Continue reading

Visit Us On FacebookVisit Us On LinkedinVisit Us On Youtube