Hi there,
I'm trying to install an Amazon cloud watch agent in my instance which running on a VPC ( internal using only, not facing the internet ). to sent Ram usage metric to cloud watch.
I'm following documents on Amazon to create Interface VPC endpoint.
1/ Stop Amazon-ssm-agent in my instance.
2/ Install Amazon cloud watch agent and related package.
Manual create config using amazon-cloudwatch-agent-config-wizard
change name of config file from config.json to amazon-cloudwatch-agent.json
also add "endpoint_override": "vpc.XXXXXXXXXXXX.logs.ap-southeast-1.vpce.amazonaws.com",
When I'm run manual by command 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/amazon-cloudwatch-agent.json
file amazon-cloudwatch-agent.json dissapear in folder etc and new file named file_amazon-cloudwatch-agent.json generated in folder amazon-cloudwatch-agent.d with the same content of amazon-cloudwatch-agent.json.
Checking log file a see the logs like this:
2022-02-09T08:04:01Z W! [processors.ec2tagger] ec2tagger: Unable to describe ec2 tags for initial retrieval: RequestError: send request failed
caused by: Post "https://ec2.ap-southeast-1.amazonaws.com/": dial tcp 52.95.35.53:443: connect: connection timed out
And I can't see the metric in Amazon cloud watch console. Can someone help me to make it work
Edited: after enable debug in log I see more log like this:
2022-02-09T09:53:07Z D! [outputs.cloudwatch] Buffer fullness: 0 / 10000 metrics
2022-02-09T09:53:07Z D! [outputs.cloudwatchlogs] Buffer fullness: 0 / 10000 metrics
2022-02-09T09:53:08Z D! [outputs.cloudwatchlogs] Buffer fullness: 0 / 10000 metrics
2022-02-09T09:53:08Z D! [outputs.cloudwatch] Buffer fullness: 0 / 10000 metrics
2022-02-09T09:53:09Z D! [outputs.cloudwatchlogs] Buffer fullness: 0 / 10000 metrics
2022-02-09T09:53:09Z D! [outputs.cloudwatch] Buffer fullness: 0 / 10000 metrics
2022-02-09T09:53:10Z D! [outputs.cloudwatch] Buffer fullness: 0 / 10000 metrics
2022-02-09T09:53:10Z D! [outputs.cloudwatchlogs] Buffer fullness: 0 / 10000 metrics
2022-02-09T09:53:11Z D! [outputs.cloudwatchlogs] Buffer fullness: 0 / 10000 metrics
2022-02-09T09:53:11Z D! [outputs.cloudwatch] Buffer fullness: 0 / 10000 metrics
2022-02-09T09:53:12Z D! [outputs.cloudwatch] Buffer fullness: 0 / 10000 metrics
2022-02-09T09:53:12Z D! [outputs.cloudwatchlogs] Buffer fullness: 0 / 10000 metrics
2022-02-09T09:53:13Z D! [outputs.cloudwatch] Buffer fullness: 0 / 10000 metrics
2022-02-09T09:53:13Z D! [outputs.cloudwatchlogs] Buffer fullness: 0 / 10000 metrics
2022-02-09T09:53:14Z D! [outputs.cloudwatch] Buffer fullness: 0 / 10000 metrics
2022-02-09T09:53:14Z D! [outputs.cloudwatchlogs] Buffer fullness: 0 / 10000 metrics
2022-02-09T09:53:15Z D! [outputs.cloudwatchlogs] Buffer fullness: 0 / 10000 metrics
2022-02-09T09:53:15Z D! [outputs.cloudwatch] Buffer fullness: 0 / 10000 metrics
2022-02-09T09:53:16Z D! [outputs.cloudwatch] Buffer fullness: 0 / 10000 metrics
2022-02-09T09:53:16Z D! [outputs.cloudwatchlogs] Buffer fullness: 0 / 10000 metrics
2022-02-09T09:53:17Z D! [outputs.cloudwatch] Buffer fullness: 0 / 10000 metrics