Skip to content

Instantly share code, notes, and snippets.

View drbugfinder-work's full-sized avatar

Richard Treu drbugfinder-work

View GitHub Profile
@drbugfinder-work
drbugfinder-work / valgrind.out
Last active February 12, 2024 14:41
valgrind output for lua chunk mode
root@vm:~/fluent-bit-lua-parallel/fluent-bit/build/bin# valgrind --leak-check=full ./fluent-bit -c fluent-bit.conf
==26121== Memcheck, a memory error detector
==26121== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
==26121== Using Valgrind-3.15.0 and LibVEX; rerun with -h for copyright info
==26121== Command: ./fluent-bit -c fluent-bit.conf
==26121==
Fluent Bit v3.0.0
* Copyright (C) 2015-2024 The Fluent Bit Authors
* Fluent Bit is a CNCF sub-project under the umbrella of Fluentd
* https://fluentbit.io
@drbugfinder-work
drbugfinder-work / lanes_example.lua
Created February 12, 2024 14:36
lanes_example.lua for parallel processing
-- Specify path to Lua Lanes module
-- Install via: 'luarocks install lanes'
local lanes_path = "/usr/local/share/lua/5.1/lanes.lua"
-- Load Lanes lib
local lanes = assert(loadfile(lanes_path))().configure()
-- Lua function that will be executed as separate threads
local function process_log(timestamp, record)
-- Add your CPU intensive code here
@drbugfinder-work
drbugfinder-work / fluent-bit.conf
Last active February 12, 2024 14:35
fluent-bit.conf lua chunk threaded
[SERVICE]
Flush 5
Log_Level debug
Daemon off
HTTP_Server Off
[INPUT]
Name dummy
Tag my_logs
Rate 1
@drbugfinder-work
drbugfinder-work / in_emitter output before
Created February 9, 2024 23:40
in_emitter output before
Fluent Bit v2.2.2
* Copyright (C) 2015-2024 The Fluent Bit Authors
* Fluent Bit is a CNCF sub-project under the umbrella of Fluentd
* https://fluentbit.io
____________________
< Fluent Bit v2.2.2 >
-------------------
\
\
@drbugfinder-work
drbugfinder-work / in_emitter output after
Created February 9, 2024 23:39
in_emitter output after
Fluent Bit v2.2.2
* Copyright (C) 2015-2024 The Fluent Bit Authors
* Fluent Bit is a CNCF sub-project under the umbrella of Fluentd
* https://fluentbit.io
____________________
< Fluent Bit v2.2.2 >
-------------------
\
\
@drbugfinder-work
drbugfinder-work / valgrind_output
Created February 9, 2024 23:11
in_emitter valgrind output
Fluent Bit v3.0.0
* Copyright (C) 2015-2024 The Fluent Bit Authors
* Fluent Bit is a CNCF sub-project under the umbrella of Fluentd
* https://fluentbit.io
____________________
< Fluent Bit v2.2.2 >
-------------------
\
\
@drbugfinder-work
drbugfinder-work / in_emitter_debug_output.diff
Created February 9, 2024 23:08
in_emitter_debug_output.diff
diff --git a/plugins/in_emitter/emitter.c b/plugins/in_emitter/emitter.c
index 62886d1..aded98b 100644
--- a/plugins/in_emitter/emitter.c
+++ b/plugins/in_emitter/emitter.c
@@ -138,8 +138,10 @@ int in_emitter_add_record(const char *tag, int tag_len,
(void *) &temporary_chunk,
sizeof(struct em_chunk));
}
-
+ flb_plg_debug(ctx->ins, "did not use ring-buffer");
@drbugfinder-work
drbugfinder-work / parsers_multiline.conf
Created February 9, 2024 22:57
in_emitter parsers_multiline.conf
[MULTILINE_PARSER]
name multiline-regex-test
type regex
flush_timeout 1000
#
# Regex rules for multiline parsing
# ---------------------------------
#
# configuration hints:
#
@drbugfinder-work
drbugfinder-work / fluent-bit.conf
Created February 9, 2024 22:51
in_emitter fluent-bit.conf
[SERVICE]
flush 1
log_level trace
parsers_file parsers_multiline.conf
[INPUT]
name dummy
Dummy {"message": "Dec 14 06:41:08 Exception in thread \"main\" java.lang.RuntimeException: Something has gone wrong, aborting!\n at com.myproject.module.MyProject.badMethod(MyProject.java:22)"}
Copies 5
Rate 2
[FILTER]
@drbugfinder-work
drbugfinder-work / fluent-bit.yaml
Created December 4, 2023 16:03
Output Processor Multi-Threading not working as expected
---
service:
flush: 1
daemon: off
log_level: info
http_server: on
health_check: on
pipeline:
inputs: