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

add lua script to optionally remap metadata keys in kube-logs #25

Closed
wants to merge 2 commits into from

Conversation

kruftik
Copy link
Contributor

@kruftik kruftik commented Jul 2, 2020

Fixes fluent/fluent-bit#1134 by injecting a lua function from fluent/fluent-bit#1134 (comment) to daemonset pods and using it to replace dots in the keys of kubernetes labels and annotations with underscore to fix data type-related conflicts

@kruftik kruftik force-pushed the feature/dedot-metadata-keys branch from b2f3af0 to 484e2c8 Compare July 2, 2020 05:52
@naseemkullah
Copy link
Collaborator

Hi @kruftik, have you considered using the Replace_Dots option for the es output?

@kruftik
Copy link
Contributor Author

kruftik commented Jul 2, 2020

this option is available only in the case of direct shipping to ES instances, however there are plenty of other options. for instance, shipping to logstash node in front of ES cluster

@naseemkullah
Copy link
Collaborator

Is this a problem you are facing today? logstash has https://www.elastic.co/guide/en/logstash/current/plugins-filters-de_dot.html if so.

That aside, as per fluent/fluent-bit#1134 (comment) it has been suggested to open a pr to add this to default scri=ipts of fluent bit, which would be better than putting it in the chart as to keep the chart lightweight.

With that said, the script is not included yet (has a pr been opened yet?), lets add instructions in readme for generl purpose lua script usage with this as an example. WDYT?

@Cyanopus
Copy link

Can we have this functionality merged as its literally impairing all other setups apart from fluent-bit to ES?We are running fluentbit to fluentd as recommended everywhere and we don't want to put yet one more filter on the aggregator part to accommodate such a small change.

@naseemkullah
Copy link
Collaborator

the idea behind this chart is to be lightweight and highly flexible, and not hard code such use cases, though if this is a script that is in high enough demand it should be added to fluent-bit as per fluent/fluent-bit#1134 (comment), please submit a pr there if this is something you see as mandatory out of the box. Else, this chart could make do with a more general approach of mounting lua scripts in general, today this can be achieved with extraVolume/extraVolumeMounts if I'm not mistaken.

@kruftik
Copy link
Contributor Author

kruftik commented Feb 3, 2021

@naseemkullah ,

does the chart need a general way to easy mounting some auxiliary Lua scripts) into the fluent-bit PODs for some advanced log processing or such stuff is out of chart scope at all?

@naseemkullah
Copy link
Collaborator

@naseemkullah ,

does the chart need a general way to easy mounting some auxiliary Lua scripts) into the fluent-bit PODs for some advanced log processing or such stuff is out of chart scope at all?

Hi @kruftik, imho a generic way to create/consume lua scripts would be a good feature, or a documented process as how this can be achieved today (i.e. first create a configmap with the script, attach it as a volume, and so on).

@kruftik
Copy link
Contributor Author

kruftik commented Feb 3, 2021

ok, we'll prepare a PR with such a feature soon, close this one.

@kruftik kruftik closed this Feb 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

spurious field mapping errors in ES output
3 participants