Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fluent-bit: Rename Fluent Bit plugin output name. #2974

Merged
merged 1 commit into from
Dec 7, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -272,8 +272,8 @@ clean:
rm -rf .cache
rm -rf cmd/docker-driver/rootfs
rm -rf dist/
rm -rf cmd/fluent-bit/out_loki.h
rm -rf cmd/fluent-bit/out_loki.so
rm -rf cmd/fluent-bit/out_grafana_loki.h
rm -rf cmd/fluent-bit/out_grafana_loki.so
go clean $(MOD_FLAG) ./...

#########
Expand Down Expand Up @@ -420,7 +420,7 @@ docker-driver-clean:
# fluent-bit plugin #
#####################
fluent-bit-plugin:
go build $(DYN_GO_FLAGS) -buildmode=c-shared -o cmd/fluent-bit/out_loki.so ./cmd/fluent-bit/
go build $(DYN_GO_FLAGS) -buildmode=c-shared -o cmd/fluent-bit/out_grafana_loki.so ./cmd/fluent-bit/

fluent-bit-image:
$(SUDO) docker build -t $(IMAGE_PREFIX)/fluent-bit-plugin-loki:$(IMAGE_TAG) -f cmd/fluent-bit/Dockerfile .
Expand Down
4 changes: 2 additions & 2 deletions cmd/fluent-bit/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ WORKDIR /src/loki
RUN make clean && make BUILD_IN_CONTAINER=false fluent-bit-plugin

FROM fluent/fluent-bit:1.4
COPY --from=build /src/loki/cmd/fluent-bit/out_loki.so /fluent-bit/bin
COPY --from=build /src/loki/cmd/fluent-bit/out_grafana_loki.so /fluent-bit/bin
COPY cmd/fluent-bit/fluent-bit.conf /fluent-bit/etc/fluent-bit.conf
EXPOSE 2020
CMD ["/fluent-bit/bin/fluent-bit", "-e","/fluent-bit/bin/out_loki.so", "-c", "/fluent-bit/etc/fluent-bit.conf"]
CMD ["/fluent-bit/bin/fluent-bit", "-e","/fluent-bit/bin/out_grafana_loki.so", "-c", "/fluent-bit/etc/fluent-bit.conf"]
2 changes: 1 addition & 1 deletion cmd/fluent-bit/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Prerequisites:
* Go 1.11+
* gcc (for cgo)

To build the output plugin library file (`out_loki.so`), you can use:
To build the output plugin library file (`out_grafana_loki.so`), you can use:

```bash
make fluent-bit-plugin
Expand Down
2 changes: 1 addition & 1 deletion cmd/fluent-bit/fluent-bit.conf
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Name tail
Path ${LOG_PATH}
[Output]
Name loki
Name grafana-loki
Match *
Url ${LOKI_URL}
BatchWait 1s
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ func (c *pluginConfig) Get(key string) string {

//export FLBPluginRegister
func FLBPluginRegister(ctx unsafe.Pointer) int {
return output.FLBPluginRegister(ctx, "loki", "Ship fluent-bit logs to Grafana Loki")
return output.FLBPluginRegister(ctx, "grafana-loki", "Ship fluent-bit logs to Grafana Loki")
}

//export FLBPluginInit
Expand Down
2 changes: 1 addition & 1 deletion docs/sources/clients/aws/ecs/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ All `options` of the `logConfiguration` will be automatically translated into [f

```conf
[OUTPUT]
Name loki
Name grafana-loki
Match awsfirelens*
Url https://<userid>:<grafancloud apikey>@logs-prod-us-central1.grafana.net/loki/api/v1/push
Labels {job="firelens"}
Expand Down
10 changes: 5 additions & 5 deletions docs/sources/clients/fluentbit/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,14 +53,14 @@ First, you need to follow the [instructions](https://github.com/grafana/loki/blo
The assuming you have Fluent Bit installed in your `$PATH` you can run the plugin using:

```bash
fluent-bit -e /path/to/built/out_loki.so -c fluent-bit.conf
fluent-bit -e /path/to/built/out_grafana_loki.so -c fluent-bit.conf
```

You can also adapt your plugins.conf, removing the need to change the command line options:

```conf
[PLUGINS]
Path /path/to/built/out_loki.so
Path /path/to/built/out_grafana_loki.so
```

## Configuration Options
Expand Down Expand Up @@ -155,7 +155,7 @@ Loki output plugin has buffering mechanism based on [`dque`](https://github.com/

```properties
[Output]
Name loki
Name grafana-loki
Match *
Url http://localhost:3100/loki/api/v1/push
Buffer true
Expand All @@ -170,7 +170,7 @@ To configure the Loki output plugin add this section to fluent-bit.conf

```properties
[Output]
Name loki
Name grafana-loki
Match *
Url http://localhost:3100/loki/api/v1/push
BatchWait 1s
Expand All @@ -184,7 +184,7 @@ To configure the Loki output plugin add this section to fluent-bit.conf

```properties
[Output]
Name loki
Name grafana-loki
Match *
Url http://localhost:3100/loki/api/v1/push
BatchWait 1s
Expand Down
2 changes: 1 addition & 1 deletion production/helm/fluent-bit/templates/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ data:
K8S-Logging.Exclude {{ .Values.config.k8sLoggingExclude }}
K8S-Logging.Parser {{ .Values.config.k8sLoggingParser }}
[Output]
Name loki
Name grafana-loki
Match *
{{- if and .Values.loki.user .Values.loki.password }}
Url {{ .Values.loki.serviceScheme }}://{{ .Values.loki.user }}:{{ .Values.loki.password }}@{{ include "loki.serviceName" . }}:{{ .Values.loki.servicePort }}{{ .Values.loki.servicePath }}
Expand Down