cloudwatchlogs-stream
v1.2.0
Published
Stream interface to AWS CloudWatch Logs
Downloads
20
Maintainers
Readme
Stream interface to CloudWatch Logs
Nice streaming interface to CloudWatch Logs. Can be used from code or as a standalone Agent.
Install
npm install cloudwatchlogs-stream --saveOr to install globally as an Agent:
npm install -g cloudwatchlogs-stream --save
cloudwatchlogs -hUsage
See cloudwatchlogs --help.
Example code:
var opts = {
'accessKeyId': 'ACCESS_KEY',
'secretAccessKey': 'SECRET_KEY',
'region': 'REGION',
'logGroupName': 'GROUP_NAME',
'logStreamName': 'STREAM_NAME',
'bulkIndex': 10,
'timeout': 20 // seconds
};
var stream = new CloudWatchLogsStream(opts);
something.pipe(stream) Example command line:
tail -f my.log | cloudwatchlogs -a ACCESSKEY -s SECRET_KEY -r REGION -g GROUP_NAME -t STREAM_NAME
