Use aws.greengrass.LogManager to upload journald logs not associated to a component?

0

I have several docker containers running on my Greengrass device that are using the Docker journald logging driver to output logs to journald. These containers run outside of any Greengrass components. Is there a way to use aws.greengrass.LogManager to collect all of the journald output and upload it to CloudWatch?

Or do I need to create a custom component that will collect all of these non-Greengrass logs and upload them separately?

2 Answers
2
Accepted Answer

Log Manager is configurable to upload any file on disk. It cannot upload from a command, but it can be configured to upload any file pattern. We'd recommend you to configure LogFileRegex and logFileDirectoryPath of aws.greengrass.LogManager to upload journald logs.

AWS
Fan_H
answered 9 months ago
profile pictureAWS
EXPERT
Greg_B
reviewed 9 months ago
0

To collect logs and metrics from other sources than files you can deploy an OpenTelemetry collector container, or FluentBit. Both these approaches can send data to CloudWatch and use the TES credentials provided by Greengrass.

AWS provides a container for FluentBit (https://docs.fluentbit.io/manual/pipeline/outputs/cloudwatch#aws-for-fluent-bit) containing all the necessary plugins.

For instructions on how to run containers images as components in Greengrass and which parameters should be passed, you can refer to the documentation

AWS
EXPERT
answered 9 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions