All Projects → streamnative → pulsar-beat-output

streamnative / pulsar-beat-output

Licence: Apache-2.0 license
Elastic Beats Output to Apache Pulsar

Programming Languages

go
31211 projects - #10 most used programming language
Dockerfile
14818 projects

Projects that are alternatives of or similar to pulsar-beat-output

pulsar-io-kafka
Pulsar IO Kafka Connector
Stars: ✭ 24 (-52.94%)
Mutual labels:  pulsar, apache-pulsar
aop
AMQP on Pulsar protocol handler
Stars: ✭ 93 (+82.35%)
Mutual labels:  pulsar, apache-pulsar
tgip-cn
TGIP-CN (Thank God Its Pulsar) is a weekly live video streaming about Apache Pulsar in Chinese.
Stars: ✭ 96 (+88.24%)
Mutual labels:  pulsar, apache-pulsar
tgip
TGIP (TGI Pulsar) is a weekly live video streaming about Apache Pulsar and its ecosystem.
Stars: ✭ 17 (-66.67%)
Mutual labels:  pulsar, apache-pulsar
pulsarctl
a CLI for Apache Pulsar written in Go
Stars: ✭ 106 (+107.84%)
Mutual labels:  pulsar, apache-pulsar
Docker Compose Elasticsearch Kibana
Docker Compose for Elasticsearch and Kibana
Stars: ✭ 584 (+1045.1%)
Mutual labels:  filebeat
Elk Hole
elasticsearch, logstash and kibana configuration for pi-hole visualiziation
Stars: ✭ 136 (+166.67%)
Mutual labels:  filebeat
K8s
Important production-grade Kubernetes Ops Services
Stars: ✭ 253 (+396.08%)
Mutual labels:  filebeat
k8s-log
容器日志搜集套件。
Stars: ✭ 15 (-70.59%)
Mutual labels:  filebeat
pulsar-flume-ng-sink
An Apache Flume Sink implementation to publish data to Apache pulsar
Stars: ✭ 19 (-62.75%)
Mutual labels:  apache-pulsar
Dockerfile
some personally made dockerfile
Stars: ✭ 2,021 (+3862.75%)
Mutual labels:  filebeat
Beats
🐠 Beats - Lightweight shippers for Elasticsearch & Logstash
Stars: ✭ 10,522 (+20531.37%)
Mutual labels:  filebeat
Elk
搭建ELK日志分析平台。
Stars: ✭ 688 (+1249.02%)
Mutual labels:  filebeat
Beat Exporter
Elastic beat-exporter for Prometheus
Stars: ✭ 139 (+172.55%)
Mutual labels:  filebeat
Aliware Kafka Demos
提供各种客户端接入阿里云 消息队列 Kafka 的demo工程
Stars: ✭ 279 (+447.06%)
Mutual labels:  filebeat
Synesis lite suricata
Suricata IDS/IPS log analytics using the Elastic Stack.
Stars: ✭ 167 (+227.45%)
Mutual labels:  filebeat
sample-filebeat-docker-logging
Powerful Logging with Docker, FileBeat and Elasticsearch
Stars: ✭ 23 (-54.9%)
Mutual labels:  filebeat
Elkstack
The config files and docker-compose.yml files of Dockerized ELK Stack
Stars: ✭ 96 (+88.24%)
Mutual labels:  filebeat
Beats Docker
Official Beats Docker images
Stars: ✭ 162 (+217.65%)
Mutual labels:  filebeat
Ansible Elk Playbook
A playbook for setting up the ELK Stack + beats log shippers on Ubuntu 16.04 and above
Stars: ✭ 83 (+62.75%)
Mutual labels:  filebeat

Beat Output Pulsar

License FOSSA Status

This is an output implementation of elastic beats for support Filebeat, Metricbeat, Functionbeat, Winlogbeat, Auditbeat to Apache Pulsar

Compatibility

This output is developed and tested using Apache Pulsar Client 2.4.0 and Beats 7.3.1

Download pulsar-beat-output

mkdir -p $GOPATH/src/github.com/streamnative/
cd $GOPATH/src/github.com/streamnative/
git clone https://github.com/streamnative/pulsar-beat-output
cd pulsar-beat-output

Build

Build beats

go build -o filebeat filebeat/filebeat.go
go build -o functionbeat functionbeat/functionbeat.go
go build -o winlogbeat winlogbeat/winlogbeat.go
go build -o packetbeat packetbeat/packetbeat.go

Usage

In this section, you can use the sample config file in the directory [./sample/config/], or you can create it as follow steps.

example

Add following configuration to beat.yml

output.pulsar:
  url: "pulsar://localhost:6650"
  topic: my_topic
  name: test123

Start filebeat

./filebeat modules enable system
./filebeat modules list
./filebeat -c filebeat.yml -e

Build and test with docker

Requirements

Build Beat images

docker build -t pulsar-beat .

Create network

docker network create pulsar-beat

Start Pulsar service

docker run -d -it --network pulsar-beat -p 6650:6650 -p 8080:8080 -v $PWD/data:/pulsar/data --name pulsar-beat-standalone apachepulsar/pulsar:2.7.0 bin/pulsar standalone

Add following configuration to filebeat.yml

output.pulsar:
  url: "pulsar://pulsar-beat-standalone:6650"
  topic: my_topic
  name: test123

Start Filebeat

docker pull golang:1.17
docker run -it --network pulsar-beat --name filebeat golang:1.17 /bin/bash
git clone https://github.com/streamnative/pulsar-beat-output
cd pulsar-beat-output
go build -o filebeat filebeat/filebeat.go
chown -R root:root filebeat.yml test_module/modules.d/system.yml test_module/module/system
cp test_module/module/system/auth/test/test.log /var/log/messages.log
cp filebeat/filebeat filebeat.yml test_module
cd test_module
./filebeat modules enable system
./filebeat -c filebeat.yml -e

New open a window for consumer message

docker cp pulsar-client.py pulsar-beat-standalone:/pulsar
docker exec -it pulsar-beat-standalone /bin/bash
python pulsar-client.py

Now you can see the information collected from filebeat.

Configurations

Client

Name Description Default
url Configure the service URL for the Pulsar service pulsar://localhost:6650
certificate_path path of tls cert file ""
private_key_path path of tls key file ""
use_tls Whether to turn on TLS, if to start, use protocol pulsar+ssl false
token Access token information of cluster ""
token_file_path The file path where token is saved ""
log_level Setting the log level, available options(panic, fatal, error, warn, info, debug, trace) info
oauth2.enabled Enabled or disabled oauth2 authentication false
oauth2.clientId client ID ""
oauth2.issuerUrl URL of the authentication provider which allows the Pulsar client to obtain an access token ""
oauth2.privateKey URL of a JSON credentials file ""
oauth2.audience The audience value is either the application (Client ID) for an ID Token or the API that is being called (API Identifier) for an Access Token ""
oauth2.scope Scope is a mechanism in OAuth 2.0 to limit an application's access to a user's account ""

Producer

Name Description Default
topic Specify the topic this producer will be publishing on. You can set the topic dynamically by using a format string to access any event field. For example %{[fields.log_topic]}. ""
partition_key Specify the message key. You can set the message key dynamically by using a format string to access any event field. For example %{[fields.partition_key]} ""
name Specify a name for the producer ""
send_timeout Set the send timeout 30s
block_if_queue_full Set whether the send and sendAsync operations should block when the outgoing message queue is full. false
batching_max_messages maximum number of messages in a batch 1000
batching_max_publish_delay the batch delay 1ms
message_routing_mode the message routing mode, SinglePartition,RoundRobinPartition, CustomPartition(0,1,2) 1
hashing_schema JavaStringHash,Murmur3_32Hash(0,1) 0
compression_type NONE,LZ4,ZLIB,ZSTD(0,1,2,3) 0
max_cache_producers Specify the maximun cache(lru) producers of dynamic topic. 8

FAQ

case-insensitive import collision: "github.com/datadog/zstd" and "github.com/DataDog/zstd"

/root/go/pkg/mod/github.com/apache/[email protected]/pulsar/internal/compression/zstd_cgo.go:27:2: case-insensitive import collision: "github.com/datadog/zstd" and "github.com/DataDog/zstd"

Replace zstd_cgo.go file

cp zstd_cgo.go /root/go/pkg/mod/github.com/apache/[email protected]/pulsar/internal/compression/zstd_cgo.go

Install Pulsar Go Client

Reference https://pulsar.apache.org/docs/en/client-libraries-go/ .

If you encounter problems with dynamic libraries,please reference:https://pulsar.apache.org/docs/en/client-libraries-cpp/.

Build Packetbeat

Reference elastic/beats#11054.

Build auditbeat.go

vendor/github.com/elastic/beats/x-pack/auditbeat/module/system/package/rpm_linux.go:23:24: fatal error: rpm/rpmlib.h: No such file or directory
aapt-get install librpm-dev

Start beat

Exiting: error loading config file: config file ("filebeat.yml") must be owned by the user identifier (uid=0) or root
chown -R root:root filebeat.yml

License

FOSSA Status

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].