Skip to content

Instantly share code, notes, and snippets.

View niedbalski's full-sized avatar
Be humble and stay focused

Jorge Niedbalski niedbalski

Be humble and stay focused
View GitHub Profile
@niedbalski
niedbalski / patch.patch
Created November 13, 2024 11:47
patch.patch
diff --git a/src/config_format/flb_cf_yaml.c b/src/config_format/flb_cf_yaml.c
index 6581692a4..dfed60197 100644
--- a/src/config_format/flb_cf_yaml.c
+++ b/src/config_format/flb_cf_yaml.c
@@ -106,7 +106,7 @@ enum state {
STATE_SECTION, /* top level */
STATE_SECTION_KEY,
STATE_SECTION_VAL,
-
+ STATE_SECTION_VAL_LIST, /* List of section values */
@niedbalski
niedbalski / stacktrace
Created November 8, 2024 14:13
stacktrace
Thread 4 "flb-out-stdout." hit Breakpoint 1.4, cb_process_logs (ins=0x1660e10,
chunk_data=0x7fffe8001100, tag=0x7ffff001d850 "dummy.0", tag_len=7)
at /var/home/ikslabdein/code/oss/fluent-bit/plugins/processor_chunk_dedup/chunk_dedup.c:72
72 struct flb_mp_chunk_cobj *chunk_cobj = (struct flb_mp_chunk_cobj *)chunk_data;
(gdb) bt
#0 cb_process_logs (ins=0x1660e10, chunk_data=0x7fffe8001100, tag=0x7ffff001d850 "dummy.0", tag_len=7)
at /var/home/ikslabdein/code/oss/fluent-bit/plugins/processor_chunk_dedup/chunk_dedup.c:72
#1 0x000000000053ae46 in flb_processor_run (proc=0x1660530, starting_stage=0, type=1,
@niedbalski
niedbalski / chunk_dedup.c
Last active November 8, 2024 19:47
chunk_dedup.c
#include <stdio.h>
#include <fluent-bit/flb_processor_plugin.h>
#include <fluent-bit/flb_mem.h>
#include <fluent-bit/flb_log.h>
#include <fluent-bit/flb_sds.h>
#include <fluent-bit/flb_hash_table.h>
#include <fluent-bit/flb_log_event_decoder.h>
#include <fluent-bit/flb_mp.h>
#include <msgpack.h>
@niedbalski
niedbalski / repro-config.yaml
Created November 4, 2024 14:11
repro-config.yaml
service:
http_server: on
pipeline:
inputs:
- name: dummy
rate: 1000
dummy: '{"message": "a message", "event_cluster": "raptor"}'
outputs:
- name: splunk
alias: splunk_pccs_standard
@niedbalski
niedbalski / macos-tls.patch
Last active October 25, 2024 10:42
macos-tls.patch
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index e24666484..82c958dde 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -284,6 +284,7 @@ if(FLB_SYSTEM_MACOS)
${FLB_DEPS}
"-framework Foundation"
"-framework IOKit"
+ "-framework Security"
)
@niedbalski
niedbalski / macos-certs.patch
Created October 25, 2024 10:38
macos-certs.patch
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index e24666484..82c958dde 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -284,6 +284,7 @@ if(FLB_SYSTEM_MACOS)
${FLB_DEPS}
"-framework Foundation"
"-framework IOKit"
+ "-framework Security"
)
@niedbalski
niedbalski / certs.patch
Created October 25, 2024 10:26
certs.patch
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index e24666484..82c958dde 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -284,6 +284,7 @@ if(FLB_SYSTEM_MACOS)
${FLB_DEPS}
"-framework Foundation"
"-framework IOKit"
+ "-framework Security"
)
@niedbalski
niedbalski / fluent-bit-flamegraph.sh
Created October 22, 2024 09:49
fluent-bit-flamegraph.sh
sudo perf record -F 99 -p $(pgrep fluent-bit) -g -- sleep 60
sudo perf script > out.perf
git clone https://github.com/brendangregg/FlameGraph.git
cd FlameGraph
./stackcollapse-perf.pl out.perf > out.folded
./flamegraph.pl out.folded > flamegraph.svg
@niedbalski
niedbalski / syslog.go
Created October 9, 2024 19:49
scan.go
package main
import (
"flag"
"fmt"
"log"
"log/syslog"
"os"
"os/signal"
"strconv"
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.14.0
labels:
calyptia.core: core-operator
name: ingestchecks.core.calyptia.com
spec:
group: core.calyptia.com