Skip to content

Conversation

@novegit
Copy link
Contributor

@novegit novegit commented Jun 16, 2020

the commit adds description of hash option in output out_kafka

Signed-off-by: Michael Voelker novecento@gmx.de

the commit adds description of hash option in output out_kafka

Signed-off-by: Michael Voelker <novecento@gmx.de>
novegit added a commit to novegit/fluent-bit that referenced this pull request Jun 16, 2020
this PR enhances plugin out_kafka with 'hash' option. See fluent/fluent-bit-docs#321

If option 'hash' is set, an uniqe hash is added to each message

configuration example:
```
  Hash                 On
  Hash_Key             _myid
```

the commit was tested in docker/openshift environment

messages in kafka with hash field '_myid':
```
{"@timestamp":1592327982.411502,"cpu_p":1.1,"user_p":0.3666666666666666,"system_p":0.7333333333333333,"cpu0.p_cpu":1.4,"cpu0.p_user":0.4,"cpu0.p_system":1,"cpu1.p_cpu":1.2,"cpu1.p_user":0.4,"cpu1.p_system":0.8,"cpu2.p_cpu":2,"cpu2.p_user":1,"cpu2.p_system":1,"cpu3.p_cpu":1,"cpu3.p_user":0.2,"cpu3.p_system":0.8,"cpu4.p_cpu":0.6,"cpu4.p_user":0,"cpu4.p_system":0.6,"cpu5.p_cpu":0.8,"cpu5.p_user":0.2,"cpu5.p_system":0.6,"_myid":"D839ED0D670D7000"}
{"@timestamp":1592327987.411792,"cpu_p":0.9666666666666666,"user_p":0.2666666666666667,"system_p":0.7,"cpu0.p_cpu":1.2,"cpu0.p_user":0.4,"cpu0.p_system":0.8,"cpu1.p_cpu":0.8,"cpu1.p_user":0.2,"cpu1.p_system":0.6,"cpu2.p_cpu":1.2,"cpu2.p_user":0.4,"cpu2.p_system":0.8,"cpu3.p_cpu":0.8,"cpu3.p_user":0.2,"cpu3.p_system":0.6,"cpu4.p_cpu":0.8,"cpu4.p_user":0.2,"cpu4.p_system":0.6,"cpu5.p_cpu":1,"cpu5.p_user":0.2,"cpu5.p_system":0.8,"_myid":"788F98C1E1632000"}
{"@timestamp":1592327992.377262,"cpu_p":0.9666666666666666,"user_p":0.3666666666666666,"system_p":0.6,"cpu0.p_cpu":1.2,"cpu0.p_user":0.4,"cpu0.p_system":0.8,"cpu1.p_cpu":0.6,"cpu1.p_user":0.2,"cpu1.p_system":0.4,"cpu2.p_cpu":1.2,"cpu2.p_user":0.6,"cpu2.p_system":0.6,"cpu3.p_cpu":1,"cpu3.p_user":0.4,"cpu3.p_system":0.6,"cpu4.p_cpu":0.4,"cpu4.p_user":0.2,"cpu4.p_system":0.2,"cpu5.p_cpu":1.2,"cpu5.p_user":0.4,"cpu5.p_system":0.8,"_myid":"4321FF0183AC4000"}
{"@timestamp":1592327997.378218,"cpu_p":1.1,"user_p":0.3666666666666666,"system_p":0.7333333333333333,"cpu0.p_cpu":1.6,"cpu0.p_user":0.4,"cpu0.p_system":1.2,"cpu1.p_cpu":0.8,"cpu1.p_user":0.4,"cpu1.p_system":0.4,"cpu2.p_cpu":1,"cpu2.p_user":0.4,"cpu2.p_system":0.6,"cpu3.p_cpu":1.2,"cpu3.p_user":0.4,"cpu3.p_system":0.8,"cpu4.p_cpu":0.8,"cpu4.p_user":0.2,"cpu4.p_system":0.6,"cpu5.p_cpu":1.4,"cpu5.p_user":0.4,"cpu5.p_system":1,"_myid":"207661B77DBA7A00"}
```

Signed-off-by: Michael Voelker <novecento@gmx.de>
novegit added a commit to novegit/fluent-bit that referenced this pull request Jun 17, 2020
this PR enhances plugin out_kafka with 'hash' option. See fluent/fluent-bit-docs#321

If option 'hash' is set, an uniqe hash is added to each message

configuration example:
```
  Hash                 On
  Hash_Key             _myid
```

the commit was tested in docker/openshift environment

messages in kafka with hash field '_myid':
```
{"@timestamp":1592327982.411502,"cpu_p":1.1,"user_p":0.3666666666666666,"system_p":0.7333333333333333,"cpu0.p_cpu":1.4,"cpu0.p_user":0.4,"cpu0.p_system":1,"cpu1.p_cpu":1.2,"cpu1.p_user":0.4,"cpu1.p_system":0.8,"cpu2.p_cpu":2,"cpu2.p_user":1,"cpu2.p_system":1,"cpu3.p_cpu":1,"cpu3.p_user":0.2,"cpu3.p_system":0.8,"cpu4.p_cpu":0.6,"cpu4.p_user":0,"cpu4.p_system":0.6,"cpu5.p_cpu":0.8,"cpu5.p_user":0.2,"cpu5.p_system":0.6,"_myid":"D839ED0D670D7000"}
{"@timestamp":1592327987.411792,"cpu_p":0.9666666666666666,"user_p":0.2666666666666667,"system_p":0.7,"cpu0.p_cpu":1.2,"cpu0.p_user":0.4,"cpu0.p_system":0.8,"cpu1.p_cpu":0.8,"cpu1.p_user":0.2,"cpu1.p_system":0.6,"cpu2.p_cpu":1.2,"cpu2.p_user":0.4,"cpu2.p_system":0.8,"cpu3.p_cpu":0.8,"cpu3.p_user":0.2,"cpu3.p_system":0.6,"cpu4.p_cpu":0.8,"cpu4.p_user":0.2,"cpu4.p_system":0.6,"cpu5.p_cpu":1,"cpu5.p_user":0.2,"cpu5.p_system":0.8,"_myid":"788F98C1E1632000"}
{"@timestamp":1592327992.377262,"cpu_p":0.9666666666666666,"user_p":0.3666666666666666,"system_p":0.6,"cpu0.p_cpu":1.2,"cpu0.p_user":0.4,"cpu0.p_system":0.8,"cpu1.p_cpu":0.6,"cpu1.p_user":0.2,"cpu1.p_system":0.4,"cpu2.p_cpu":1.2,"cpu2.p_user":0.6,"cpu2.p_system":0.6,"cpu3.p_cpu":1,"cpu3.p_user":0.4,"cpu3.p_system":0.6,"cpu4.p_cpu":0.4,"cpu4.p_user":0.2,"cpu4.p_system":0.2,"cpu5.p_cpu":1.2,"cpu5.p_user":0.4,"cpu5.p_system":0.8,"_myid":"4321FF0183AC4000"}
{"@timestamp":1592327997.378218,"cpu_p":1.1,"user_p":0.3666666666666666,"system_p":0.7333333333333333,"cpu0.p_cpu":1.6,"cpu0.p_user":0.4,"cpu0.p_system":1.2,"cpu1.p_cpu":0.8,"cpu1.p_user":0.4,"cpu1.p_system":0.4,"cpu2.p_cpu":1,"cpu2.p_user":0.4,"cpu2.p_system":0.6,"cpu3.p_cpu":1.2,"cpu3.p_user":0.4,"cpu3.p_system":0.8,"cpu4.p_cpu":0.8,"cpu4.p_user":0.2,"cpu4.p_system":0.6,"cpu5.p_cpu":1.4,"cpu5.p_user":0.4,"cpu5.p_system":1,"_myid":"207661B77DBA7A00"}
```

Signed-off-by: Michael Voelker <novecento@gmx.de>
@edsiper
Copy link
Member

edsiper commented Dec 13, 2021

note: waiting for fluent/fluent-bit#2268

@edsiper edsiper added the waiting-for-user Waiting for user/contributors feedback or requested changes label Dec 13, 2021
novegit added a commit to novegit/fluent-bit that referenced this pull request Mar 28, 2022
this PR enhances plugin out_kafka with 'hash' option. See fluent/fluent-bit-docs#321

If option 'hash' is set, an uniqe hash is added to each message

configuration example:
```
  Hash                 On
  Hash_Key             _myid
```

the commit was tested in docker/openshift environment

messages in kafka with hash field '_myid':
```
{"@timestamp":1648491317.038613,"cpu_p":1.266666666666667,"user_p":0.9,"system_p":0.3666666666666666,"cpu0.p_cpu":0.8,"cpu0.p_user":0.4,"cpu0.p_system":0.4,"cpu1.p_cpu":1.2,"cpu1.p_user":0.8,"cpu1.p_system":0.4,"cpu2.p_cpu":0.8,"cpu2.p_user":0.4,"cpu2.p_system":0.4,"cpu3.p_cpu":1.4,"cpu3.p_user":1.0,"cpu3.p_system":0.4,"cpu4.p_cpu":1.2,"cpu4.p_user":0.8,"cpu4.p_system":0.4,"cpu5.p_cpu":1.8,"cpu5.p_user":1.6,"cpu5.p_system":0.2,"_id":"8a726e3841ebe225017073cd79d6a34ece3c3f9b20ae155d48610f3f99d49ef6"}
{"@timestamp":1648491313.039214,"message":"dummy","kubernetes":{"labels":{"app":"fluentbit"}},"_id":"52e3e91e42d99eebd02cbfd863f9df979a8147615dbe979cbaf7c1fc8be8c107"}
{"@timestamp":1648491314.041181,"message":"dummy","kubernetes":{"labels":{"app":"fluentbit"}},"_id":"800535ad134c2dea06580233358665ca769698c95f7fb5ead34523de420df450"}
{"@timestamp":1648491315.041067,"message":"dummy","kubernetes":{"labels":{"app":"fluentbit"}},"_id":"e6cd998b20207c71d65e7037e998aeefe36029739cb5fd1879b10252deaf5295"}
{"@timestamp":1648491316.038793,"message":"dummy","kubernetes":{"labels":{"app":"fluentbit"}},"_id":"6cc2cb91766c333999842665c2467e03af6e502c9a75a8a22f6b0afe720bf31c"}
{"@timestamp":1648491317.038671,"message":"dummy","kubernetes":{"labels":{"app":"fluentbit"}},"_id":"149c5b304277efcf94a420425dfe074346c73f4b0ad809d6609aec5fda02386a"}
{"@timestamp":1648491318.038539,"message":"dummy","kubernetes":{"labels":{"app":"fluentbit"}},"_id":"19b05475c35bcad1880737ea4c060b31480927ee8066f238c9cf13db839d192b"}
```

Signed-off-by: Michael Voelker <novecento@gmx.de>
novegit added a commit to novegit/fluent-bit that referenced this pull request Mar 28, 2022
this PR enhances plugin out_kafka with 'hash' option. See fluent/fluent-bit-docs#321

If option 'hash' is set, an uniqe hash is added to each message

configuration example:
```
  Hash                 On
  Hash_Key             _myid
```

the commit was tested in docker/openshift environment

messages in kafka with hash field '_myid':
```
{"@timestamp":1648491317.038613,"cpu_p":1.266666666666667,"user_p":0.9,"system_p":0.3666666666666666,"cpu0.p_cpu":0.8,"cpu0.p_user":0.4,"cpu0.p_system":0.4,"cpu1.p_cpu":1.2,"cpu1.p_user":0.8,"cpu1.p_system":0.4,"cpu2.p_cpu":0.8,"cpu2.p_user":0.4,"cpu2.p_system":0.4,"cpu3.p_cpu":1.4,"cpu3.p_user":1.0,"cpu3.p_system":0.4,"cpu4.p_cpu":1.2,"cpu4.p_user":0.8,"cpu4.p_system":0.4,"cpu5.p_cpu":1.8,"cpu5.p_user":1.6,"cpu5.p_system":0.2,"_id":"8a726e3841ebe225017073cd79d6a34ece3c3f9b20ae155d48610f3f99d49ef6"}
{"@timestamp":1648491313.039214,"message":"dummy","kubernetes":{"labels":{"app":"fluentbit"}},"_id":"52e3e91e42d99eebd02cbfd863f9df979a8147615dbe979cbaf7c1fc8be8c107"}
{"@timestamp":1648491314.041181,"message":"dummy","kubernetes":{"labels":{"app":"fluentbit"}},"_id":"800535ad134c2dea06580233358665ca769698c95f7fb5ead34523de420df450"}
{"@timestamp":1648491315.041067,"message":"dummy","kubernetes":{"labels":{"app":"fluentbit"}},"_id":"e6cd998b20207c71d65e7037e998aeefe36029739cb5fd1879b10252deaf5295"}
{"@timestamp":1648491316.038793,"message":"dummy","kubernetes":{"labels":{"app":"fluentbit"}},"_id":"6cc2cb91766c333999842665c2467e03af6e502c9a75a8a22f6b0afe720bf31c"}
{"@timestamp":1648491317.038671,"message":"dummy","kubernetes":{"labels":{"app":"fluentbit"}},"_id":"149c5b304277efcf94a420425dfe074346c73f4b0ad809d6609aec5fda02386a"}
{"@timestamp":1648491318.038539,"message":"dummy","kubernetes":{"labels":{"app":"fluentbit"}},"_id":"19b05475c35bcad1880737ea4c060b31480927ee8066f238c9cf13db839d192b"}
```

Signed-off-by: Michael Voelker <novecento@gmx.de>
@lecaros lecaros added the conflict Waiting on conflict to be resolved by contributor label May 17, 2022
@lecaros lecaros requested review from a team as code owners March 25, 2025 14:34
@eschabell
Copy link
Collaborator

@novegit can you resolve this conflict so it's ready to merge with the code PR fluent/fluent-bit#2268?

@eschabell eschabell self-assigned this Oct 21, 2025
Signed-off-by: Lynette  Miles <6818907+esmerel@users.noreply.github.com>
@esmerel
Copy link
Contributor

esmerel commented Oct 21, 2025

I went ahead and dealt with the conflict in a way that looked right to me, so we can push this forward.

@eschabell eschabell removed waiting-for-user Waiting for user/contributors feedback or requested changes conflict Waiting on conflict to be resolved by contributor labels Nov 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants