How to Test:
cd $GOPATH
# get the code
mkdir -p src/github.com/pivotal-cf
cd src/github.com/pivotal-cf
git clone [email protected]:pivotal-cf/fluent-bit-out-syslog.git
# get dependencies
cd $GOPATH/src
go get -d -t github.com/pivotal-cf/fluent-bit-out-syslog/cmd...
# run code build
cd $GOPATH/src/github.com/pivotal-cf/fluent-bit-out-syslog/cmd
go build -buildmode c-shared -o out_syslog.so .
# run test
cd $GOPATH/src/github.com/pivotal-cf/fluent-bit-out-syslog/cmd
go test -v ./...
How to Test in Docker-compose:
cd $GOPATH/src/github.com/pivotal-cf/fluent-bit-out-syslog/
./tests/test.sh
fluent-bit \
--input dummy \
--plugin ./out_syslog.so \
--output syslog \
--prop Addr=localhost:12345
tests/fluent-bit-kubernetes/README.md
./tests/run-linter.sh
Add the following output section to your Fluent Bit configuration file. Note
that the EnableTLS and InsecureSkipVerify configurations are optional and
only needed if you are connecting to an endpoint that supports TLS. By
default, both of those optional fields are false.
[OUTPUT]
Name syslog
Match *
Sinks [{"addr":"logs.papertrailapp.com:18271", "enable_tls":"true", "insecure_skip_verify":"true"}]
[INPUT]
Name tail
Tag kube.*
Path /var/log/containers/*.log
Parser docker
DB /var/log/flb_kube.db
Mem_Buf_Limit 5MB
Skip_Long_Lines On
Refresh_Interval 10
[FILTER]
Name kubernetes
Match kube.*
Kube_URL https://kubernetes.default.svc.cluster.local:443
Merge_Log On
K8S-Logging.Parser On
[OUTPUT]
Name syslog
Match *
Sinks [{"addr":"logs.papertrailapp.com:18271", "namespace":"myns", "enable_tls":"true", "insecure_skip_verify":"true"}]
ClusterSinks [{"addr":"logs.papertrailapp.com:18272", "enable_tls":"true", "insecure_skip_verify":"true"}]