-
Notifications
You must be signed in to change notification settings - Fork 1.8k
out_influxdb: allow stripping of tag prefix #9427
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
base: master
Are you sure you want to change the base?
Conversation
Removes a configured prefix from measurement names Signed-off-by: Ueli Graf <[email protected]>
d6e4d82
to
cb44828
Compare
Example configuration file for this change - how to write to different buckets in the same DB without adding measurement name prefixes:
|
Debug log output
|
valgrind memcheck output
|
Signed-off-by: Ueli Graf <[email protected]>
d4aa84c
to
c45887d
Compare
This PR is stale because it has been open 45 days with no activity. Remove stale label or comment or this will be closed in 10 days. |
this PR is pending for review |
This PR is stale because it has been open 45 days with no activity. Remove stale label or comment or this will be closed in 10 days. |
This removes a defined prefix from measurement names which might otherwise be shared between many measurements in the same data bucket.
When writing to a range of different buckets, routing to the corresponding out_influxdb instances happens on tag matches. This change allows to match on tag prefixes, but strip them from the measurement name. This avoids having identical prefixes for all measurement names in the same data bucket.
To achieve this, read from char tag[] with an offset when writing the measurement name, provided the prefix matches the tag completely and the overlap is at most tag_length - 1 characters.
Enter
[N/A]
in the box, if an item is not applicable to your change.Testing
Before we can approve your change; please submit the following in a comment:
If this is a change to packaging of containers or native binaries then please confirm it works for all targets.
ok-package-test
label to test for all targets (requires maintainer to do).Documentation
fluent/fluent-bit-docs#1468
Backporting
Fluent Bit is licensed under Apache 2.0, by submitting this pull request I understand that this code will be released under the terms of that license.