Log all journald messages to AWS Cloudwatch
1
vote
1
answer
452
views
I'm migrating our existing Amazon Linux 2 servers to Amazon Linux 2023. One of the changes is that the AL2023 now uses journald for it's logging. I have the requirement to have all logging in AWS Cloudwatch.
I've already enabled the normal cloudwatch agent for metrics and a few logfiles. This is working as expected.
For journald I've checked various options and decided to implement [journald-cloudwatch-logs](https://github.com/saymedia/journald-cloudwatch-logs) , as it looked the most promising. I've configured it but I have a problem:
* The service starts successful, but I simply do not see any logging in cloudwatch.
This is the config:
aws_region = "eu-central-1"
ec2_instance_id = "i-xxxxxxxxxx"
log_group = "LogGroup"
log_stream = "server01-systemctl"
state_file = "/var/lib/journald-cloudwatch-logs/state"
log_priority = "INFO"
I've checked journalctl but no errors or any other indication something is wrong. Also, because the normal cloudwatch agent logs successfully to another log stream I know the IAM permissions are fine.
My questions:
* How can I make journald-cloudwatch-logs to actually log to cloudwatch?
Any help is greatly appreciated.
Edit: I'm also open for other approached to log journald messages to cloudwatch
Asked by GetShifting
(153 rep)
Apr 11, 2025, 09:21 AM
Last activity: Apr 18, 2025, 07:56 AM
Last activity: Apr 18, 2025, 07:56 AM