Compare commits

...

2 Commits

Author SHA1 Message Date
Mohd Husaam Mehdi
79928e9fc3 fluent-bit: make syslog output message format more acceptable 2025-05-21 21:59:46 +05:30
Mohd Husaam Mehdi
8e9492f7af logmngr: add support for conf_path to specify fluent-bit config 2025-05-21 21:59:02 +05:30
2 changed files with 19 additions and 1 deletions

View File

@@ -0,0 +1,14 @@
diff --git a/plugins/out_syslog/syslog.c b/plugins/out_syslog/syslog.c
index 4ecc7c4ac..03ed0d359 100644
--- a/plugins/out_syslog/syslog.c
+++ b/plugins/out_syslog/syslog.c
@@ -318,7 +318,8 @@ static flb_sds_t syslog_rfc3164 (flb_sds_t *s, struct flb_time *tms,
return NULL;
}
- tmp = flb_sds_printf(s, "<%i>%s %2d %02d:%02d:%02d ", prival,
+ // just add 99 to satisfy parsers that expect a number at the start
+ tmp = flb_sds_printf(s, "99 <%i>%s %2d %02d:%02d:%02d ", prival,
rfc3164_mon[tm.tm_mon], tm.tm_mday,
tm.tm_hour, tm.tm_min, tm.tm_sec);
if (!tmp) {

View File

@@ -307,6 +307,7 @@ logmngr_init() {
config_load logmngr
config_get_bool enabled globals enable "1"
config_get conf_path globals conf_path
create_config_file
create_service_section
@@ -321,7 +322,10 @@ logmngr_init() {
fi
procd_open_instance logmngr
if [ -s "${TMP_CONF_FILE}" ]; then
if [ -n "${conf_path}" ]; then
procd_set_param command $PROG -c ${conf_path}
procd_set_param file ${conf_path}
elif [ -s "${TMP_CONF_FILE}" ]; then
procd_set_param command $PROG -c ${TMP_CONF_FILE}
procd_set_param file ${TMP_CONF_FILE}
elif [ -s "${CONF_FILE}" ]; then