AWS CloudWatch not sending logs - AWS AMI

0

Morning all, I have 100+ servers working well with the old cloudwatch/logs agent and it appears they have a new version that they are combining, so the cloudwatch agent does it all. So I ran the wizard, most of the defaults and selected the one log that I want to send up but it's simply not showing. So I did run the wizard to setup the metrics AND the log I want, so far, this is what I have in the logs section;

/opt/aws/amazon-cloudwatch-agent/bin/config.json has the following log section;

        "logs": {
                "logs_collected": {
                        "files": {
                                "collect_list": [
                                        {
                                                "file_path": "/var/log/health.log",
                                                "log_group_name": "app-health",
                                                "log_stream_name": "{instance_id}",
                                                "retention_in_days": 14
                                        }
                                ]
                        }
                }
        },

The agent is running; /opt/aws/amazon-cloudwatch-agent/bin/amazon-cloudwatch-agent-ctl -a status { "status": "running", "starttime": "2023-12-07T15:26:36+0000", "configstatus": "configured", "version": "1.300031.0b313" }

/opt/aws/amazon-cloudwatch-agent/logs/amazon-cloudwatch-agent.log shows nothing but info, which is normally my goto, the only thing I found was odd was the line; "Reading json config file path: /opt/aws/amazon-cloudwatch-agent/etc/amazon-cloudwatch-agent.json"

As that file doesn't exist, it uses the other path, but before I look to deep, I wanted to confirm that the whole awslogs process has been moved into the cloudwatch agent and I am on the right path. Permissions for that box to write to cloudwatch is there, I can telnet to the port, etc. so to me its a simple config that is not correct out of the box.

gefragt vor 6 Monaten93 Aufrufe
Keine Antworten

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen