-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
[Filebeat] Support the custom nginx-ingress-controller Nginx log format #8451
Comments
Interesting suggestion. @exekias Thoughts? |
It's possible to add new patterns to the existing pipeline. I am thinking about if we should add it to the existing pipelines or add a new separate fileset. |
It's a more general problem we have to solve: Having 2 different types of log files for 1 dataset. Elasticsearch logs will change in 7.0. How do we cope with the old and new format (@ycombinator )? Can we have a config option to define which pipeline is used in fileset and can this config option be set during enabling a module or for example through autodiscovery? |
@ruflin I think for simplicity, this should be a different module as the goals of an ingress controller is more narrow than that of a general-purpose web server. |
Path to the selected pipeline of modules are already configurable in Example configuration:
Versions could be corresponding to the input application versions in order to minimize confusion. However, nginx-ingest-controller does not have anything to do with this problem. It's a separate application which configures the logging format of nginx differently. What happens if we need to support multiple versions of this? By adding it as a separate fileset and introducing the new option
instead of
|
@kvch Even without Nginx controller in the picture, Nginx already has at least two built-in formats, and allows for custom. I think using version is abusing the purpose of it. Using filesets is also a hack. I just think a fileset should have a setting for format, plus, ideally, it should allow to easily add a custom format to an existing module. |
How does the data from Nginx is a bit special here as it allows all this custom config for the logs. |
@nikolay I think we should introduce a new Ingest pipeline for ingress-controller to decrease the time to find the matching pattern. So letting users select the pipeline they would like to use during processing is not abusing anything. Also, as @ruflin pointed it out, a fileset processes data from a single log file. Is the logs of Regarding custom config for patterns I think those are for users who have custom log format configured to fit their needs. This is an application default you have linked to, so we should provide something for users who do not want to come up with a matching pattern. |
Something to take into account here is also easiness of the configuration. Using module parameters is ok, but things like that are not available in autodiscover (at least not as of today). We may want to consider the specific module because of that. I think this ties to how we handle pipelines & modules, I think it worth a discussion for the longer term. |
@kvch It's abusing it as in the case of Nginx, an instance have all filesets, they are just in different formats. Like MySQL slow log, etc. In the Nginx example, the error log and the access log are always present. So, you want to add a third fileset, which actually is a variant of the access log - it will be confusing and an abuse of your original design. Well, if you add a "variant" or "flavor" to a fileset with marking one as the default, then that's a different story! Then in the hints you can provide something like |
I agree with you. I think we are thinking about the same thing when you speak about "flavor" and I do about pipeline versioning. We need something which takes care of different variants of the same logs under the same path. |
I quite like the syntax that @nikolay used do describe a "flavor/version". An alternative would be to use |
can anyone comment on the current state of affairs ? is this solved? or are there any known workarounds? |
In the Kubernetes world, one of the most popular choices for an ingress controller is the nginx-ingress-controller, which doesn't use a standard Nginx log format though. Instead, it uses a custom format, documented here: https://github.com/kubernetes/ingress-nginx/blob/master/docs/user-guide/nginx-configuration/log-format.md
Given how many projects use this ingress controller, it would be nice to add a module called nginx-ingress-controller and make things work for people out of the box instead of every projects having to clone the nginx module. Or maybe add some kind of option to the nginx module to support this de facto standard in the Kubernetes world format instead.
I think this will greatly improve the adoption of Filebeats within the Kubernetes ecosystem!
The text was updated successfully, but these errors were encountered: