RepositoryGoDEGermany
s12v

s12v/awsbeats

AWS Kinesis plugin for Filebeat

60stars
26forks
7issues
3views

Build Status codecov

AWS Beats

Experimental Beat output plugin. Tested with Filebeat, Metricbeat, Auditbeat, Heartbeat, APM Server. Supports AWS Kinesis Data Streams and Data Firehose.

NOTE: Beat and the plugin should be built using the same Golang version.

Quick start

Either:

Firehose

  • Add to filebeats.yml:
output.firehose:
  region: eu-central-1
  stream_name: test1 # Your delivery stream name
  • Run filebeat with plugin ./filebeat-v6.5.4-go1.11-linux-amd64 -plugin kinesis.so-0.2.14-v6.5.4-go1.11-linux-amd64

Streams

output.streams:
  region: eu-central-1
  stream_name: test1 # Your stream name
  partition_key: mykey # In case your beat event is {"foo":1,"mykey":"bar"}, not "mykey" but "bar" is used as the partition key

See the example filebeat.yaml for more details.

  • Run filebeat with plugin ./filebeat-v6.5.4-go1.11-linux-amd64 -plugin kinesis.so-0.2.14-v6.5.4-go1.11-linux-amd64

AWS authentication

  • Default AWS credentials chain is used (environment, credentials file, EC2 role)
  • Assume role is not supported

Build it yourself

Build requires Go 1.10+. You need to define Filebeat version (v6.5.4 in this example)

go get github.com/elastic/beats
# curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh
dep ensure
make BEATS_VERSION=v6.5.4

In target/ you will find filebeat and plugin, for example:

filebeat-v6.5.4-go1.11-linux-amd64
kinesis.so-1-snapshot-v6.5.4-go1.11-linux-amd64

Running in a docker container

To build a docker image for awsbeats, run make dockerimage.

filebeat

make dockerimage BEATS_VERSION=6.5.4 GO_VERSION=1.11.4 BEAT_NAME=filebeat GOPATH=$HOME/go

There is also a convenient make target filebeat-image with sane defaults:

make filebeat-image

The resulting docker image is tagged s12v/awsbeats:filebeat-canary. It contains a custom build of filebeat and the plugin, along with all the relevant files from the official filebeat docker image.

To try running it, provide AWS credentials via e.g. envvars and run hack/dockerized-filebeat:

export AWS_ACCESS_KEY_ID=...
export AWS_SECRET_ACCESS_KEY=...

hack/containerized-filebeat

Emit some line-delimited json log messages:

hack/emit-ndjson-logs

metricbeat

make metricbeat-image

hack/containerized-metricbeat

apm-server

make apm-server-image

hack/containerized-apm-server

auditbeat

make auditbeat-image

hack/containerized-auditbeat

heartbeat

make heartbeat-image

hack/containerized-heartbeat

Running awsbeats on a Kubernetes cluster

Filebeat

Use the helm chart:

cat << EOS > values.yaml
image:
  repository: kubeaws/awsbeats
  tag: canary
  pullPolicy: Always

plugins:
  - kinesis.so

config:
  output.file:
    enabled: false
  output.streams:
    enabled: true
    region: ap-northeast-1
    stream_name: test1
    partition_key: mykey
EOS

# No need to do this once stable/filebeat v0.3.0 is published
# See https://github.com/kubernetes/charts/pull/5698
git clone git@github.com:kubernetes/charts.git charts

helm upgrade --install filebeat ./charts/stable/filebeat \
  -f values.yaml \
  --set rbac.enabled=true

APM Server

cat << EOS > values.yaml
image:
  repository: kubeaws/awsbeats
  tag: apm-server-canary
  pullPolicy: Always

plugins:
  - kinesis.so

config:
  output.file:
    enabled: false
  output.streams:
    enabled: true
    region: ap-northeast-1
    stream_name: test1
    partition_key: mykey
EOS

# No need to do this once stable/apm-server is merged
# See https://github.com/kubernetes/charts/pull/6058
git clone git@github.com:mumoshu/charts.git charts
git checkout apm-server

helm upgrade --install apm-server ./charts/stable/apm-server \
  -f values.yaml \
  --set rbac.enabled=true

Auditbeat

cat << EOS > values.yaml
image:
  repository: kubeaws/awsbeats
  tag: auditbeat-canary
  pullPolicy: Always

plugins:
  - kinesis.so

config:
  output.file:
    enabled: false
  output.streams:
    enabled: true
    region: ap-northeast-1
    stream_name: test1
    partition_key: mykey
EOS

# No need to do this once stable/auditbeat is merged
# See https://github.com/kubernetes/charts/pull/6089
git clone git@github.com:mumoshu/charts.git charts
git checkout auditbeat

helm upgrade --install auditbeat ./charts/stable/auditbeat \
  -f values.yaml \
  --set rbac.enabled=true

Heartbeat

cat << EOS > values.yaml
image:
  repository: kubeaws/awsbeats
  tag: heartbeat-canary
  pullPolicy: Always

plugins:
  - kinesis.so

config:
  output.file:
    enabled: false
  output.streams:
    enabled: true
    region: ap-northeast-1
    stream_name: test1
    partition_key: mykey
EOS

# No need to do this once stable/heartbeat is merged
# See https://github.com/kubernetes/charts/pull/5766
git clone git@github.com:mumoshu/charts.git charts
git checkout heartbeat

helm upgrade --install heartbeat ./charts/stable/heartbeat \
  -f values.yaml \
  --set rbac.enabled=true

Metricbeat

Edit the official Kubernetes manifests to use:

  • custom metricbeat docker image
  • streams output instead of the default elasticsearch one
( find ~/go/src/github.com/elastic/beats/deploy/kubernetes/metricbeat -name '*.yaml' -not -name metricbeat-daemonset-configmap.yaml -exec bash -c 'sed -e '"'"'s/image: .*/image: "kubeaws\/awsbeats:metricbeat-canary"/g'"'"' {} | sed -e '"'"'s/"-e",/"-e", "-plugin", "kinesis.so",/g'"'" \; -exec echo '---' \; ) > metricbeat.all.yaml

kubectl create -f example/metricbeat/metricbeat.configmap.yaml -f metricbeat.all.yaml

Trouble-shooting

If you see No such file or directory error of filebeat while building the plugin, you likely to be relying on the default GOPATH. It is $HOME/go in recent versions of golang.

If you got affected by this, try running:

$ make BEATS_VERSION=v6.5.4 GOPATH=$HOME/go

Publishing your own awsbeats images

The following example builds kubeaws/awsbeats:0.2.4-metricbeat-v6.3.1 from your worktree:

make metricbeat-image DOCKER_IMAGE=kubeaws/awsbeats AWSBEATS_VERSION=0.2.4 BEATS_VERSION=6.3.1

Output buffering

TODO

Similar Projects

Discover other similar projects and AI models.

RepositoryPython
elastic/beats-docker

Official Beats Docker images

165
Jun 26, 2019
RepositoryJava
macrozheng/mall

mall项目是一套电商系统,包括前台商城系统及后台管理系统,基于Spring Boot+MyBatis实现,采用Docker容器化部署。 前台商城系统包含首页门户、商品推荐、商品搜索、商品展示、购物车、订单流程、会员中心、客户服务、帮助中心等模块。 后台管理系统包含商品管理、订单管理、会员管理、促销管理、运营管理、内容管理、统计报表、财务管理、权限管理、设置等模块。

85.1k
Sep 15, 2026
RepositoryGo
grafana/grafana

The open and composable observability and data visualization platform. Visualize metrics, logs, and traces from multiple sources like Prometheus, Loki, Elasticsearch, InfluxDB, Postgres and many more.

78.4k
Nov 30, 2026
RepositoryJava
elastic/elasticsearch

Free and Open Source, Distributed, RESTful Search Engine

78.9k
Nov 30, 2026
Modelsentence-similarity
sentence-transformers/all-MiniLM-L6-v2

all-MiniLM-L6-v2 This is a sentence-transformers(https://www.SBERT.net) model: It maps sentences & paragraphs to a 384 dimensional dense vector space and can be used for tasks like clustering or semantic search. Usage (Sentence-Transformers) Using t...

♥0
157.6M
Jun 1, 2026
RepositoryGo
zincsearch/zincsearch

ZincSearch . A lightweight alternative to elasticsearch that requires minimal resources, written in Go.

17.9k
Sep 16, 2026
RepositoryGo
googleapis/mcp-toolbox

MCP Toolbox for Databases is an open source MCP server for databases.

17.0k
Nov 27, 2026
RepositoryGo
elastic/beats

:tropical_fish: Beats - Lightweight shippers for Elasticsearch & Logstash

12.7k
Nov 26, 2026
RepositoryGo
olivere/elastic

Deprecated: Use the official Elasticsearch client for Go at https://github.com/elastic/go-elasticsearch

7.4k
Aug 8, 2024