Skip to content

Instantly share code, notes, and snippets.

@omalave
Forked from sherlockholmes/CloudWatchAgent.sh
Created February 18, 2021 16:52
Show Gist options
  • Save omalave/3c0c709da3b010af1423a4eb8b22f8d0 to your computer and use it in GitHub Desktop.
Save omalave/3c0c709da3b010af1423a4eb8b22f8d0 to your computer and use it in GitHub Desktop.

Revisions

  1. @sherlockholmes sherlockholmes revised this gist Jan 31, 2021. 1 changed file with 4 additions and 0 deletions.
    4 changes: 4 additions & 0 deletions CloudWatchAgent.sh
    Original file line number Diff line number Diff line change
    @@ -27,4 +27,8 @@ cd /usr/share/collectd
    sudo touch types.db

    Inicia el Cloudwatch Agent
    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

    Revisa el estado del Servicio
    sudo systemctl status amazon-cloudwatch-agent

  2. @sherlockholmes sherlockholmes revised this gist Jan 31, 2021. No changes.
  3. @sherlockholmes sherlockholmes revised this gist Jan 31, 2021. 1 changed file with 0 additions and 1 deletion.
    1 change: 0 additions & 1 deletion CloudWatchAgent.sh
    Original file line number Diff line number Diff line change
    @@ -26,6 +26,5 @@ sudo mkdir /usr/share/collectd
    cd /usr/share/collectd
    sudo touch types.db


    Inicia el Cloudwatch Agent
    sudo systemctl status amazon-cloudwatch-agent
  4. @sherlockholmes sherlockholmes revised this gist Jan 31, 2021. 1 changed file with 5 additions and 0 deletions.
    5 changes: 5 additions & 0 deletions CloudWatchAgent.sh
    Original file line number Diff line number Diff line change
    @@ -20,6 +20,11 @@ cd /opt/aws/amazon-cloudwatch-agent/bin
    ls amazon-cloudwatch-agent-config-wizard
    sudo ./amazon-cloudwatch-agent-config-wizard

    Pasos adicionales recomendados:

    sudo mkdir /usr/share/collectd
    cd /usr/share/collectd
    sudo touch types.db


    Inicia el Cloudwatch Agent
  5. @sherlockholmes sherlockholmes revised this gist Jan 31, 2021. 1 changed file with 4 additions and 3 deletions.
    7 changes: 4 additions & 3 deletions CloudWatchAgent.sh
    Original file line number Diff line number Diff line change
    @@ -11,15 +11,16 @@ Descarga la firma y verifica el paquete
    wget https://s3.amazonaws.com/amazoncloudwatch-agent/amazon_linux/amd64/latest/amazon-cloudwatch-agent.rpm.sig
    gpg --verify amazon-cloudwatch-agent.rpm.sig amazon-cloudwatch-agent.rpm

    Instala el Agente de cloudwatch
    sudo rpm -U ./amazon-cloudwatch-agent.rpm # Podrias usar "yum install" tambien.

    Configura el CloudWatch Agent

    sudo systemctl status amazon-ssm-agent
    cd /opt/aws/amazon-cloudwatch-agent/bin
    ls amazon-cloudwatch-agent-config-wizard
    sudo ./amazon-cloudwatch-agent-config-wizard

    Instala el Agente de cloudwatch
    sudo rpm -U ./amazon-cloudwatch-agent.rpm # You may use "yum install" syntax too.


    Inicia el Cloudwatch Agent
    sudo systemctl status amazon-cloudwatch-agent
  6. @sherlockholmes sherlockholmes revised this gist Jan 31, 2021. 1 changed file with 0 additions and 2 deletions.
    2 changes: 0 additions & 2 deletions CloudWatchAgent.sh
    Original file line number Diff line number Diff line change
    @@ -23,5 +23,3 @@ sudo rpm -U ./amazon-cloudwatch-agent.rpm # You may use "yum install" syntax to

    Inicia el Cloudwatch Agent
    sudo systemctl status amazon-cloudwatch-agent

    sudo /opt/aws/amazon-cloudwatch-agent/bin/amazon-cloudwatch-agent-ctl -a fetch-config -m ec2 -c file:configuration-file-path -s
  7. @sherlockholmes sherlockholmes renamed this gist Jan 31, 2021. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  8. @sherlockholmes sherlockholmes renamed this gist Jan 31, 2021. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  9. @sherlockholmes sherlockholmes created this gist Jan 31, 2021.
    27 changes: 27 additions & 0 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,27 @@
    Descarga el paquete de instalacion

    wget https://s3.amazonaws.com/amazoncloudwatch-agent/amazon_linux/amd64/latest/amazon-cloudwatch-agent.rpm

    Instala la llave
    wget https://s3.amazonaws.com/amazoncloudwatch-agent/assets/amazon-cloudwatch-agent.gpg
    gpg --import amazon-cloudwatch-agent.gpg # obten el <key-value>
    gpg --fingerprint <key-value> # obten el fingerprint

    Descarga la firma y verifica el paquete
    wget https://s3.amazonaws.com/amazoncloudwatch-agent/amazon_linux/amd64/latest/amazon-cloudwatch-agent.rpm.sig
    gpg --verify amazon-cloudwatch-agent.rpm.sig amazon-cloudwatch-agent.rpm

    Configura el CloudWatch Agent

    sudo systemctl status amazon-ssm-agent
    cd /opt/aws/amazon-cloudwatch-agent/bin
    ls amazon-cloudwatch-agent-config-wizard
    sudo ./amazon-cloudwatch-agent-config-wizard

    Instala el Agente de cloudwatch
    sudo rpm -U ./amazon-cloudwatch-agent.rpm # You may use "yum install" syntax too.

    Inicia el Cloudwatch Agent
    sudo systemctl status amazon-cloudwatch-agent

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