Skip to content

in_winevtlog: Launch w/o valid subscription when using ignore_missing_channels parameter [Backport 3.2] #10564

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

Open
wants to merge 1 commit into
base: 3.2
Choose a base branch
from
Open
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
13 changes: 9 additions & 4 deletions plugins/in_winevtlog/in_winevtlog.c
Original file line number Diff line number Diff line change
Expand Up @@ -110,10 +110,15 @@ static int in_winevtlog_init(struct flb_input_instance *in,

ctx->active_channel = winevtlog_open_all(tmp, ctx);
if (!ctx->active_channel) {
flb_plg_error(ctx->ins, "failed to open channels");
flb_log_event_encoder_destroy(ctx->log_encoder);
flb_free(ctx);
return -1;
if (ctx->ignore_missing_channels) {
flb_plg_debug(ctx->ins, "failed to open and no subscribed channels");
}
else {
flb_plg_error(ctx->ins, "failed to open and no subscribed channels. Subscribe at least one");
flb_log_event_encoder_destroy(ctx->log_encoder);
flb_free(ctx);
return -1;
}
}

/* Initialize SQLite DB (optional) */
Expand Down
Loading