Skip to content

Commit

Permalink
Prepare env to work with Fluentd for TLS impl
Browse files Browse the repository at this point in the history
  • Loading branch information
r0mdau committed Nov 19, 2023
1 parent f4f27f9 commit 10010d8
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 5 deletions.
10 changes: 7 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@ generate-logs:
./scripts/generate-logs.sh 100 >> testdata/access.log
.PHONY:generate-logs

prepare:
docker run -d --name fluent --rm -p 127.0.0.1:24224:24224 fluent/fluent-bit /fluent-bit/bin/fluent-bit -i forward -o stdout -p format=json_lines -f 1
.PHONY:prepare
run-fluentbit:
docker run --name fluentbit --rm -p 127.0.0.1:24224:24224 fluent/fluent-bit /fluent-bit/bin/fluent-bit -i forward -o stdout -p format=json_lines -f 1
.PHONY:run-fluentbit

run-fluentd:
docker run --name fluentd --rm -p 127.0.0.1:24224:24224 -v ./testdata/fluentd.conf:/fluentd/etc/fluentd.conf:ro fluent/fluentd:v1.16-debian-amd64-1 -c /fluentd/etc/fluentd.conf -v
.PHONY:run-fluentd
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ git clone --recurse-submodules git@github.com:r0mdau/otelcol-dev.git
Run a [Fluent Bit](https://fluentbit.io/) instance that will receive messages over TCP port 24224 through the [fluent-forward](https://docs.fluentbit.io/manual/pipeline/outputs/forward) protocol and send the messages to stdout interface in JSON format every second

```bash
docker run --name fluent --rm -p 127.0.0.1:24224:24224 fluent/fluent-bit /fluent-bit/bin/fluent-bit -i forward -o stdout -p format=json_lines -f 1
make prepare
```

Build the custom collector
Expand All @@ -41,7 +41,7 @@ bash scripts/generate-logs.sh 100 >> testdata/access.log
Look at Fluentbit logs

```bash
docker logs fluent
docker logs fluentbit
```

### Customize the otel modules
Expand Down
16 changes: 16 additions & 0 deletions testdata/fluentd.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<source>
@type forward
@id input1
@label @mainstream
port 24224
</source>

<filter **>
@type stdout
</filter>

<label @mainstream>
<match **>
@type stdout
</match>
</label>

0 comments on commit 10010d8

Please sign in to comment.