Prezados boa tarde.
Na aula 04.03 - Instalando o Agent-CloudWatch,
Após o comando sudo /opt/aws/amazon-cloudwatch-agent/bin/amazon-cloudwatch-agent-ctl -a fetch-config -m ec2 -s -c file:/opt/aws/amazon-cloudwatch-agent/etc/common-config.toml, na saída da execução do comando não está iniciando o agente, consequentemente não aparece no Painel do CloudWatch.
Veja a saída do comando acima:
[ec2-user@ip-172-31-24-123 etc]$ sudo /opt/aws/amazon-cloudwatch-agent/bin/amazon-cloudwatch-agent-ctl -a fetch-config -m ec2 -s -c file:/opt/aws/amazon-cloudwatch-agent/etc/common-config.toml ****** processing amazon-cloudwatch-agent ****** I! Trying to detect region from ec2 D! [EC2] Found active network interface I! imds retry client will retry 1 timesSuccessfully fetched the config and saved in /opt/aws/amazon-cloudwatch-agent/etc/amazon-cloudwatch-agent.d/file_common-config.toml.tmp Start configuration validation... 2024/06/10 17:55:40 Reading json config file path: /opt/aws/amazon-cloudwatch-agent/etc/amazon-cloudwatch-agent.d/file_common-config.toml.tmp ... 2024/06/10 17:55:40 unable to scan config dir /opt/aws/amazon-cloudwatch-agent/etc/amazon-cloudwatch-agent.d with error: unable to parse json, error: invalid character '#' looking for beginning of value 2024/06/10 17:55:40 No json config files found, use the default one 2024/06/10 17:55:40 I! Valid Json input schema. 2024/06/10 17:55:40 D! ec2tagger processor required because append_dimensions is set 2024/06/10 17:55:40 D! pipeline hostDeltaMetrics has no receivers 2024/06/10 17:55:40 Configuration validation first phase succeeded I! Detecting run_as_user... I! Trying to detect region from ec2 D! [EC2] Found active network interface I! imds retry client will retry 1 times /opt/aws/amazon-cloudwatch-agent/bin/amazon-cloudwatch-agent -schematest -config /opt/aws/amazon-cloudwatch-agent/etc/amazon-cloudwatch-agent.toml Configuration validation second phase succeeded Configuration validation succeeded amazon-cloudwatch-agent has already been stopped <--- aqui está o problema.
Obs.: a execução do comando aws configure está ok...