https://github.com/in4it/tee2cloudwatch
Send your output data of your commands to cloudwatch logs.
https://github.com/in4it/tee2cloudwatch
aws cloudwatch-logs
Last synced: 6 months ago
JSON representation
Send your output data of your commands to cloudwatch logs.
- Host: GitHub
- URL: https://github.com/in4it/tee2cloudwatch
- Owner: in4it
- Created: 2020-05-20T16:19:44.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2020-05-26T11:53:27.000Z (about 6 years ago)
- Last Synced: 2023-03-06T18:06:47.271Z (over 3 years ago)
- Topics: aws, cloudwatch-logs
- Language: Go
- Size: 7.81 KB
- Stars: 7
- Watchers: 3
- Forks: 3
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# tee2cloudwatch
Send your output data of your commands to cloudwatch logs. Works well in combination with AWS UserData scripts. You can send the output data of your initialization scripts straight to cloudwatch logs instead of writing them in /var/log.
# Usage
```
Usage of ./tee2cloudwatch:
-logGroup string
log group name
-region string
region
```
# Example
```
#!/bin/bash -e
exec > >(./tee2cloudwatch -logGroup test -region eu-west-1) 2>&1
echo "Hello from user-data!"
echo "this is another echo"
echo "..."
echo "more messages"
sleep 2
echo "..."
echo "more messages"
sleep 30
echo "and one more... goodbye!"
```