Code Monkey home page Code Monkey logo

kinesis-tail's Introduction

kinesis-tail Build Status

Tool which provides tail for Kinesis, it allows you to use one of two processors for the data returned, firstly one which decompresses and parses CloudWatch Logs data, and secondly one which just returns the raw data.

background

The cloudwatch logs reader is designed to work with a common pattern used at Versent for log distribution and storage.

For more information on the setup for cwlogs sub command to function it assumes the logs are gzipped batches of log JSON records in Kinesis see Real-time Processing of Log Data with Subscriptions

installation

You can download kinesis-tail from Releases or install it using npm.

npm install @versent/kinesis-tail -g

usage

usage: kinesis-tail [<flags>] <command> [<args> ...]

Flags:
      --help           Show context-sensitive help (also try --help-long and --help-man).
  -t, --trace          Enable trace mode.
  -r, --region=REGION  Configure the aws region.
      --version        Show application version.

Commands:
  help [<command>...]
    Show help.


  cwlogs [<flags>] <stream>
    Process cloudwatch logs data from kinesis.

    --include=INCLUDE ...  Include anything in log group names which match the supplied string.
    --exclude=EXCLUDE ...  Exclude anything in log group names which match the supplied string.

  raw [<flags>] <stream>
    Process raw data from kinesis.

    --timeout=3600000  How long to capture raw data for before exiting in ms.
    --count=0          How many records to capture raw data for before exiting.


example

List the kinesis streams in your account.

aws kinesis list-streams

To tail one of these streams and exit once you have captured 20 records.

kinesis-tail raw dev-1-stream --count 20

To tail one of these streams and exit after 30 seconds, and write the data to a file.

kinesis-tail raw dev-1-stream --timeout 30000 | tee data.log

license

This code is released under MIT License.

kinesis-tail's People

Contributors

wolfeidau avatar pwmcintyre avatar threetoes avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.