Cloudwatch logs from EC2 Instance, Ubuntu

Поделиться
HTML-код
  • Опубликовано: 29 сен 2024
  • Send Apache Web Server's Access logs and Error logs to cloudwatch logs.
    Install and configure cloudwatch agent on EC2 Instance , Ubuntu 20.04.
    Provided role with necessary permission to EC2 instance in order to sent the logs to cloudwatch.
    Cloudwatch log group will be created automaticall along with two log streams for apache's access log and error log respectively.
    Steps to install and configure cloudwatch agent
    1. wget s3.amazonaws.c...
    2. sudo dpkg -i -E ./amazon-cloudwatch-agent.deb
    3. sudo /opt/aws/amazon-cloudwatch-agent/bin/amazon-cloudwatch-agent-config-wizard
    4. sudo apt-get update -y
    5. sudo apt-get install collectd
    6. 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
    7. sudo /opt/aws/amazon-cloudwatch-agent/bin/amazon-cloudwatch-agent-ctl -a status

Комментарии • 15

  • @Rachel-eq7uf
    @Rachel-eq7uf 20 дней назад

    I followed your video because my bootcamp video for this portion of my learning was out of date. this video really helped me get connected to cloudwatch! However none of my access and error log streams show a timestamp. I don't know if this is something I should be concerned with or not.. haha The Apache2 Ubuntu DNS default page showed up fine which means it is connected and I was able to find my EC2 log group.

  • @pratikshajadhav9287
    @pratikshajadhav9287 3 месяца назад +1

    Thanks...its really work😊😊😊

  • @muhammadkholid5351
    @muhammadkholid5351 Год назад +1

    You are my savior. only you show how to install cloudwatch in ubuntu. Thanks man.

  • @shyampillai1864
    @shyampillai1864 10 месяцев назад +1

    Thank you so much for this bhai !

    • @webdevcloud1
      @webdevcloud1  10 месяцев назад

      Kindly like share and subscribe if you find that useful

  • @dominicnewing2477
    @dominicnewing2477 4 месяца назад

    Nice one ! - really helped :)

  • @vidhanshuborade5977
    @vidhanshuborade5977 3 месяца назад

    thanks!

  • @NinjaAnkit
    @NinjaAnkit 5 месяцев назад

    Thanks

  • @sainumediacreations532
    @sainumediacreations532 Год назад

    All are done but i cant see any link g group in my cloudwatch why? Followed all steps correctly

    • @webdevcloud1
      @webdevcloud1  Год назад

      You can check the logs for the info residing in /var/log/amazon/amazon-cloudwatch-agent directory, mostly in file amazon-cloudwatch-agent.log...

  • @komalmagar9455
    @komalmagar9455 Год назад

    I followed all the steps but at the end log group is not created, what's your suggestion? Thanks in advance.

    • @webdevcloud1
      @webdevcloud1  Год назад +2

      You can check if the role that is attached to the instance has permission of cloudwatch logs...

    • @Rachel-eq7uf
      @Rachel-eq7uf 22 дня назад

      @@webdevcloud1 if we add extra permissions to test this would we need to configure it all over again to create the log groups?

  • @itsmess1088
    @itsmess1088 Год назад

    Hi, while I enter the cmd "sudo dpkg -i -E ./amazon-cloudwatch-agent.deb",
    it shows error "dpkg: error processing archive ./amazon-cloudwatch-agent.deb (--install):
    package architecture (arm64) does not match system (amd64)
    Errors were encountered while processing:
    ./amazon-cloudwatch-agent.deb"
    How could I resolve it ? Thank you. btw I'm using M1... 😞

    • @webdevcloud1
      @webdevcloud1  Год назад

      Try to add amd64 architecture by command and try again
      dpkg --add-architecture amd64