-
Notifications
You must be signed in to change notification settings - Fork 465
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
make nginx-ingress-controller work with k8s #4855
make nginx-ingress-controller work with k8s #4855
Conversation
🌐 Coverage report
|
multi: false | ||
required: true | ||
show_user: true | ||
default: ${kubernetes.labels.app.kubernetes.io/name} == 'ingress-nginx' | ||
title: Nginx Ingress Controller access logs | ||
description: Collect Nginx Ingress Controller access logs |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure this is correct. the name at https://kubernetes.github.io/ingress-nginx/ is Nginx Ingress Controller
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm. Left just some minors.
packages/nginx_ingress_controller/data_stream/access/agent/stream/stream.yml.hbs
Outdated
Show resolved
Hide resolved
packages/nginx_ingress_controller/data_stream/access/agent/stream/stream.yml.hbs
Show resolved
Hide resolved
packages/nginx_ingress_controller/data_stream/access/agent/stream/stream.yml.hbs
Outdated
Show resolved
Hide resolved
So only #4855 (comment) seems to be a blocker by now. @gsantoro let me know when the PR is ready for a final look. |
packages/nginx_ingress_controller/data_stream/access/_dev/test/system/test-default-config.yml
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! I think we can merge this.
Please file a follow up issue for the testing part so as to keep track and not forget.
Package nginx_ingress_controller - 1.6.0 containing this change is available at https://epr.elastic.co/search?package=nginx_ingress_controller |
What does this PR do?
Adapt the nginx-ingress-controller integration to work with logs from /var/log/containers/*.log since /var/log/nginx/access.log and /var/log/nginx/error.log are respectively symlinks to /dev/stdout and /dev/stderr.
List of changes:
logfile
tofilestream
to consume from k8s logs (eg. in CRI format and symlinks) instead of static files created by nginxaccess
datastream consumes from container stdout stream whileerror
datastream consumes from container stderr stream/var/log/containers/*${kubernetes.container.id}.log
from/var/log/nginx/ingress.log*
condition
to filter all k8s container logs to only the nginx-ingress-controller podprospector.scanner.symlinks
to consume from symbolic linksparsers.container
to consume container logs with either CRI or docker format. By default it usesauto
format so that the input can detect automatically which format to useChecklist
changelog.yml
file.Author's Checklist
How to test this PR locally
Related issues