Skip to content

Commit 631c042

Browse files
author
Warren Fernandes
committed
examples: out_multiinstance: add docker output to readme
1 parent 2bfab63 commit 631c042

File tree

1 file changed

+29
-1
lines changed

1 file changed

+29
-1
lines changed

examples/out_multiinstance/README.md

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ data, the proper bytes length and the associated tag.
6262

6363
```go
6464
//export FLBPluginFlushCtx
65-
func FLBPluginFlush(ctx, data unsafe.Pointer, length C.int, tag *C.char) int {
65+
func FLBPluginFlushCtx(ctx, data unsafe.Pointer, length C.int, tag *C.char) int {
6666

6767
id := *(*string)(ctx)
6868
log.Printf("[multiinstance] Flush called for id: %s", *id)
@@ -98,3 +98,31 @@ $ cd $GOPATH/src/github.com/fluent/fluent-bit-go/examples/out_multiinstance
9898
$ docker build . -t fluent-bit-multiinstance
9999
$ docker run -it --rm fluent-bit-multiinstance
100100
```
101+
102+
The output produced should resemble the following:
103+
```
104+
Fluent Bit v1.1.0
105+
Copyright (C) Treasure Data
106+
107+
[2019/05/17 22:33:04] [ info] [storage] initializing...
108+
[2019/05/17 22:33:04] [ info] [storage] in-memory
109+
[2019/05/17 22:33:04] [ info] [storage] normal synchronization mode, checksum
110+
disabled
111+
[2019/05/17 22:33:04] [ info] [engine] started (pid=1)
112+
2019/05/17 22:33:04 [multiinstance] id = "cpu_metrics"
113+
2019/05/17 22:33:04 [multiinstance] id = "dummy_metrics"
114+
[2019/05/17 22:33:04] [ info] [sp] stream processor started
115+
2019/05/17 22:33:09 [multiinstance] Flush called for id: cpu_metrics
116+
[0] cpu.local: [2019-05-17 22:33:05.0007371 +0000 UTC, {"cpu0.p_user": 0, "cpu1.p_cpu": 3, "cpu2.p_cpu": 0, "cpu3.p_user": 0, "cpu_p": 1.5, "system_p": 1.25, "cpu0.p_cpu": 3, "cpu0.p_system": 3, "cpu1.p_user": 1, "cpu2.p_system": 0, "cpu2.p_user": 0, "cpu3.p_cpu": 0, "cpu3.p_system": 0, "user_p": 0.25, "cpu1.p_system": 2, }
117+
[1] cpu.local: [2019-05-17 22:33:06.0026806 +0000 UTC, {"cpu1.p_user": 0, "cpu2.p_system": 0, "cpu1.p_system": 0, "cpu2.p_cpu": 0, "cpu3.p_user": 0, "cpu0.p_system": 0, "cpu1.p_cpu": 0, "system_p": 0, "cpu0.p_cpu": 0, "cpu0.p_user": 0, "cpu2.p_user": 0, "cpu3.p_cpu": 0, "cpu3.p_system": 0, "cpu_p": 0, "user_p": 0, }
118+
[2] cpu.local: [2019-05-17 22:33:07.002157 +0000 UTC, {"user_p": 0, "cpu0.p_system": 0, "cpu1.p_user": 0, "cpu3.p_user": 0, "cpu3.p_system": 0, "system_p": 0.25, "cpu0.p_user": 0, "cpu1.p_cpu": 1, "cpu2.p_user": 0, "cpu_p": 0.25, "cpu0.p_cpu": 0, "cpu1.p_system": 1, "cpu2.p_cpu": 0, "cpu3.p_cpu": 0, "cpu2.p_system": 0, }
119+
[3] cpu.local: [2019-05-17 22:33:08.0014056 +0000 UTC, {"cpu0.p_cpu": 0, "cpu2.p_cpu": 0, "user_p": 0, "cpu1.p_cpu": 1, "cpu1.p_user": 0, "cpu1.p_system": 1, "cpu2.p_system": 0, "cpu3.p_cpu": 0, "cpu0.p_user": 0, "cpu2.p_user": 0, "cpu3.p_system": 0, "cpu_p": 0.25, "system_p": 0.25, "cpu0.p_system": 0, "cpu3.p_user": 0, }
120+
2019/05/17 22:33:09 [multiinstance] Flush called for id: dummy_metrics
121+
[0] dummy.local: [2019-05-17 22:33:05.0008583 +0000 UTC, {"message": [100 117 109 109 121], }
122+
[1] dummy.local: [2019-05-17 22:33:06.0027443 +0000 UTC, {"message": [100 117 109 109 121], }
123+
[2] dummy.local: [2019-05-17 22:33:07.0022096 +0000 UTC, {"message": [100 117 109 109 121], }
124+
[3] dummy.local: [2019-05-17 22:33:08.0014587 +0000 UTC, {"message": [100 117 109 109 121], }
125+
```
126+
127+
As you can see each instance has their own set of outputs along with the
128+
configuration context made available.

0 commit comments

Comments
 (0)