fluent-bit-aliyun icon indicating copy to clipboard operation
fluent-bit-aliyun copied to clipboard

add plugin to fluent-bit-aliyun

Open icloudnote opened this issue 8 years ago • 5 comments
trafficstars

how to add fluent-bit-aliyun for fluent-bit?

icloudnote avatar Jul 06 '17 09:07 icloudnote

we've made a bundled image at https://hub.docker.com/r/kubeup/fluent-bit-aliyun/ which you could use directly.

We use circle.ci to compile the plugin and to build the target image with it. The Dockerfile is at https://github.com/kubeup/fluent-bit-aliyun/blob/master/docker-image/Dockerfile . You could use it as a reference if you wanted to build your own image.

adieu avatar Jul 06 '17 12:07 adieu

i compile the plugin from source. so what should i do, i can load plugin for fluent-bit. i don't want to use docker-image

icloudnote avatar Jul 07 '17 02:07 icloudnote

if you don't use docker, then you could run fluent-bit loading fluent-bit-aliyun as the output plugin.

fluent-bit -c /etc/fluent-bit/fluent-bit.conf -e /etc/fluent-bit/out_sls.so

/etc/fluent-bit/out_sls.so should be the path to the compiled plugin.

And in the configuration, you have to set sls as the output plugin. Check https://github.com/kubeup/fluent-bit-aliyun/blob/master/docker-image/etc/fluent-bit.conf for an example.

adieu avatar Jul 07 '17 03:07 adieu

i compile the plugin is fluent-bit-aliyun, where is the out_sls.so, what happened with my plugin; fluent-bit-aliyun/ ├── circle.yml ├── docker-image │   ├── Dockerfile │   └── etc │   ├── fluent-bit.conf │   ├── fluent-bit-forwarder.conf │   └── parsers.conf ├── flatten.go ├── fluent-bit-aliyun => i build from source code ├── fluent-bit-daemonset.yaml ├── glide.lock ├── glide.yaml ├── Makefile ├── out_sls.go └── README.md

icloudnote avatar Jul 07 '17 12:07 icloudnote

use this command to build the plugin:

GOOS=linux go build -buildmode=c-shared -o out_sls.so github.com/kubeup/fluent-bit-aliyun

adieu avatar Jul 07 '17 13:07 adieu