Skip to content
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

[output-opensearch] Convert the index to lowercase. #8528

Open
wants to merge 1 commit into
base: master
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
5 changes: 5 additions & 0 deletions plugins/out_opensearch/opensearch.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
#include <fluent-bit/flb_log_event_decoder.h>
#include <msgpack.h>

#include <ctype.h>
#include <cfl/cfl.h>

#include "opensearch.h"
Expand Down Expand Up @@ -496,6 +497,10 @@ static int opensearch_format(struct flb_config *config,
index = ra_index;
}

for (int i = 0; index[i]; i++) {
index[i] = tolower(index[i]);
}

if (ctx->suppress_type_name) {
index_len = flb_sds_snprintf(&j_index,
flb_sds_alloc(j_index),
Expand Down
Loading