1.0.6 • Published 3 years ago

cloudwatch-logs-search v1.0.6

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

cloudwatch-logs-search

This is sample logic that filters and retrieves logs from Amazon CloudWatch.

Reference

Changelog

See CHANGELOG.md.

Getting Started

Install package.

npm i cloudwatch-logs-search;

Install dependent packages.

cd cloudwatch-logs-search;
npm i;

Add your Amazon CloudWatch Logs credentials to your environment variables.

.env:

NODE_ENV=development
AWS_CLOUD_WATCH_LOGS_REGION=ap-northeast-1
AWS_CLOUD_WATCH_LOGS_ACCESS_KEY=****
AWS_CLOUD_WATCH_LOGS_SECRET_KEY=********

Search logs.

The log group name is an exact match search and the log stream name is an fuzzy search.

node search.js 'Log group name' 'Log stream name';

Usage

How to use search.js.

Gets all logs from the stream that contains the specified log stream name..

node search.js 'Log group name' 'Log stream name';

Gets the log that matches the keyword from the stream that contains the specified log stream name..

node search.js 'Log group name' 'Log stream name' 'keyword';

License

MIT licensed

1.0.6

3 years ago

1.0.5

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago