cloudwatch-logs-search

1.0.6 • Public • Published

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

Dependents (0)

Package Sidebar

Install

npm i cloudwatch-logs-search

Weekly Downloads

0

Version

1.0.6

License

MIT

Unpacked Size

11.9 kB

Total Files

10

Last publish

Collaborators

  • takuya-motoshima