Sign inSign up

endlessm/cw-logs

By endlessm

•Updated about 6 years ago

Send files to CloudWatch logs

Image
Integration & delivery
Monitoring & observability
0

2.3K

endlessm/cw-logs repository overview

⁠AWS ClougWatch Agent

Send files to CloudWatch logs.

⁠Usage

Run with the directory of the log file mounted inside the container and specifying the LOG_GROUP_NAME, LOG_STREAM_NAME and LOG_FILE environment variables. Also, the usual AWS CLI environment variables⁠ can also be specified. Lastly, the AWS region is deduced on startup by accessing the instance metadata⁠, unless the AWS_DEFAULT_REGION enviroment variable is specified. By default the container uses the nobody user, but you may need to specify a different user in case the log file is not readable but that user. For file rotation detection⁠, don't mount just the file but the whole directory inside the container.

⁠Example usage

docker run -d -v '/var/log:/var/log:ro' -e 'LOG_GROUP_NAME=/var/log/' -e 'LOG_STREAM_NAME={instance_id}' -e 'LOG_FILE=/var/log/ecs/ecs-agent.log.*' adarnimrod/cw-logs

⁠License

This software is licensed under the MIT license (see LICENSE.txt).

⁠Author Information

Nimrod Adar, contact me⁠ or visit my website⁠. Patches are welcome via git send-email⁠. The repository is located at: https://www.shore.co.il/git/⁠.

Tag summary

Content type

Image

Digest

Size

37.6 MB

Last updated

about 6 years ago

docker pull endlessm/cw-logs