8000 [pull] master from fluent:master by pull[bot] · Pull Request #47 · ThomasDevoogdt/fluent-bit · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

[pull] master from fluent:master #47

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jun 24, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions plugins/in_calyptia_fleet/in_calyptia_fleet.c
Original file line number Diff line number Diff line change
Expand Up @@ -857,6 +857,7 @@ static struct flb_http_client *fleet_http_do(struct flb_in_calyptia_fleet_config
size_t b_sent;
struct flb_connection *u_conn;
struct flb_http_client *client;
flb_sds_t config_version;

if (ctx == NULL || url == NULL) {
return NULL;
Expand All @@ -878,6 +879,13 @@ static struct flb_http_client *fleet_http_do(struct flb_in_calyptia_fleet_config

flb_http_buffer_size(client, ctx->max_http_buffer_size);

config_version = flb_sds_create_size(32);
flb_sds_printf(&config_version, "%ld", ctx->config_timestamp);
flb_http_add_header(client,
FLEET_HEADERS_CONFIG_VERSION, sizeof(FLEET_HEADERS_CONFIG_VERSION) -1,
config_version, flb_sds_len(config_version));
flb_sds_destroy(config_version);

flb_http_add_header(client,
CALYPTIA_HEADERS_PROJECT, sizeof(CALYPTIA_HEADERS_PROJECT) - 1,
ctx->api_key, flb_sds_len(ctx->api_key));
Expand Down
2 changes: 2 additions & 0 deletions plugins/in_calyptia_fleet/in_calyptia_fleet.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@
#include <fluent-bit/flb_sds.h>
#include <fluent-bit/flb_reload.h>

#define FLEET_HEADERS_CONFIG_VERSION "Fleet-Config-Version"

struct flb_in_calyptia_fleet_config {
/* Time interval check */
int interval_sec;
Expand Down
24 changes: 23 additions & 1 deletion src/config_format/flb_cf_yaml.c
Original file line number Diff line number Diff line change
Expand Up @@ -2881,7 +2881,29 @@ static int read_config(struct flb_cf *conf, struct local_ctx *ctx,
status = yaml_parser_parse(&parser, &event);

if (status == YAML_FAILURE) {
flb_error("[config] invalid YAML format in file %s", cfg_file);
if (parser.problem) {
flb_error("[config] invalid YAML in file %s at line %zu, column %zu: %s",
cfg_file,
parser.problem_mark.line + 1,
parser.problem_mark.column + 1,
parser.problem);

/* Provide contextual hint if the error is not on the first line */
if (parser.problem_mark.line > 0) {
flb_error("[config] hint: check line %zu (above) for missing ':' or incorrect indentation",
parser.problem_mark.line);
}
}
else {
flb_error("[config] invalid YAML format in file %s at line %zu, column %zu",
cfg_file,
parser.problem_mark.line + 1,
parser.problem_mark.column + 1);

if (parser.problem_mark.line > 0) {
flb_error("[config] hint: check line %zu for syntax issues", parser.problem_mark.line);
}
}
code = -1;
goto done;
}
Expand Down
0