Amazon Kinesis Client for Go
Find a file
Taylor Sutton f5ce6fe4e7 Add decoding of JSON logs in Fluent format.
ParseAndEnhance used to be:
- Try to parse line as a syslog, extracting the log itself and other
  fields from syslog format
  - If that succeeds, try to parse the log as either a Kayvee log or
    an RDS slow query log.
  - Combine all these fields, and add on some "derived"
    fields (container_task|env|app).
- Not a syslog => error

Now it will be:
- Try to parse line as a syslog, same as before, including the
  Kayvee/RDS part
- If syslog parsing failed, try to parse as a Fluent log and extract
  some fields from the Fluent format (the log, timestamp, etc)
  - If that succeeds, try to parse the log itself as a Kayvee log.
  - Combine Kayvee fields (if found) and derived fields)
- If BOTH formats fields, it is an error.

The decoding makes a lot of assumptions:
- The names of the log field and timestamp field (even though,
theoretically, they are customizable in the fluentbit config.
- The timestamp format (again)
- The format of the Task Definition name (or at least part of it)
- All fluentbit logs should have hostname set to `aws-fargate`.

Perhaps these can be relaxed if necessary. They could probably be
replaced by some kind of config. As there is currently no config I
wanted to keep things simple as possible. If we need to re-evaluate
(for example if we start getting JSON logs that don't want to use the
same handling for container_task|env|app) we can reevaluate.
2020-08-17 15:02:59 -07:00
.circleci Upgrade go to v1.13 2019-10-18 09:45:22 -07:00
.github add codeowners 2020-07-20 18:11:27 +00:00
batchconsumer Added error message for failed log written to file 2018-12-11 16:32:33 -08:00
cmd Merge pull request #33 from wwwjfy/fix-shutdown-requested 2018-12-11 16:28:37 -08:00
decode Add decoding of JSON logs in Fluent format. 2020-08-17 15:02:59 -07:00
kcl Merge pull request #33 from wwwjfy/fix-shutdown-requested 2018-12-11 16:28:37 -08:00
splitter glue log group format 2020-08-11 16:42:59 -07:00
.gitignore Added vendor to .gitignore 2017-05-22 22:57:34 +00:00
batchconsumer.properties Implemented new consumer interface as well as example consumer: 'batchconsumer' 2017-07-18 02:03:15 +00:00
consumer.properties initial commit 2017-02-08 20:23:00 +00:00
golang.mk update golang.mk 2018-10-11 12:39:00 -07:00
Gopkg.lock fix Gopkg.lock 2020-07-24 12:19:30 -07:00
Gopkg.toml Remove self-references in Gopkg.toml 2018-02-16 13:14:07 -08:00
Makefile update to repo1 link for jars 2020-04-06 13:31:10 -07:00
README.md initial commit 2017-02-08 20:23:00 +00:00

amazon-kinesis-client-go

A port of amazon-kinesis-client-python to Go.

Running the Consumer

Edit the file consumer.properties to point at a Kinesis stream that has some data. Build the consumer binary:

make build

Then run:

make run

This will download the jar files necessary to run the KCL, and then launch the KCL communicating with the consumer binary.