From f5394c51d551343cde99b2a725cb88984241d1a8 Mon Sep 17 00:00:00 2001 From: Chris Mark Date: Tue, 7 Apr 2020 18:08:14 +0300 Subject: [PATCH] Add ingress_controller docs (#17510) Signed-off-by: chrismark (cherry picked from commit c0f1854d668c5443d7f3f11222ed266baad9977f) --- filebeat/docs/modules/nginx.asciidoc | 22 +++++++++++++++++++++- filebeat/module/nginx/_meta/docs.asciidoc | 22 +++++++++++++++++++++- 2 files changed, 42 insertions(+), 2 deletions(-) diff --git a/filebeat/docs/modules/nginx.asciidoc b/filebeat/docs/modules/nginx.asciidoc index 450832b12b72..b5d52d7d0d99 100644 --- a/filebeat/docs/modules/nginx.asciidoc +++ b/filebeat/docs/modules/nginx.asciidoc @@ -12,6 +12,10 @@ This file is generated! See scripts/docs_collector.py The +{modulename}+ module parses access and error logs created by the http://nginx.org/[Nginx] HTTP server. +`ingress_controller` fileset parses access logs created by https://github.com/kubernetes/ingress-nginx[ingress-nginx] controller. +Log patterns could be found on the controllers' +https://github.com/kubernetes/ingress-nginx/blob/nginx-0.28.0/docs/user-guide/nginx-configuration/log-format.md[docs]. + include::../include/what-happens.asciidoc[] include::../include/gs-link.asciidoc[] @@ -24,6 +28,8 @@ The Nginx module was tested with logs from version 1.10. On Windows, the module was tested with Nginx installed from the Chocolatey repository. +`ingress_controller` fileset was tested with version 0.28.0 of `nginx-ingress-controller`. + include::../include/configuring-intro.asciidoc[] The following example shows how to set paths in the +modules.d/{modulename}.yml+ @@ -48,8 +54,17 @@ To specify the same settings at the command line, you use: -M "nginx.access.var.paths=[/path/to/log/nginx/access.log*]" -M "nginx.error.var.paths=[/path/to/log/nginx/error.log*]" ----- +The following example shows how to configure `ingress_controller` fileset which can be used in Kubernetes environments +to parse ingress-nginx logs: + +["source","yaml",subs="attributes"] +----- +- module: nginx + ingress_controller: + enabled: true + var.paths: ["/path/to/log/nginx/ingress.log"] +----- - //set the fileset name used in the included example :fileset_ex: access @@ -66,6 +81,11 @@ include::../include/var-paths.asciidoc[] include::../include/var-paths.asciidoc[] +[float] +==== `ingress_controller` log fileset + +include::../include/var-paths.asciidoc[] + include::../include/timezone-support.asciidoc[] [float] diff --git a/filebeat/module/nginx/_meta/docs.asciidoc b/filebeat/module/nginx/_meta/docs.asciidoc index 4c2b38e0681f..e365dd079d8d 100644 --- a/filebeat/module/nginx/_meta/docs.asciidoc +++ b/filebeat/module/nginx/_meta/docs.asciidoc @@ -7,6 +7,10 @@ The +{modulename}+ module parses access and error logs created by the http://nginx.org/[Nginx] HTTP server. +`ingress_controller` fileset parses access logs created by https://github.com/kubernetes/ingress-nginx[ingress-nginx] controller. +Log patterns could be found on the controllers' +https://github.com/kubernetes/ingress-nginx/blob/nginx-0.28.0/docs/user-guide/nginx-configuration/log-format.md[docs]. + include::../include/what-happens.asciidoc[] include::../include/gs-link.asciidoc[] @@ -19,6 +23,8 @@ The Nginx module was tested with logs from version 1.10. On Windows, the module was tested with Nginx installed from the Chocolatey repository. +`ingress_controller` fileset was tested with version 0.28.0 of `nginx-ingress-controller`. + include::../include/configuring-intro.asciidoc[] The following example shows how to set paths in the +modules.d/{modulename}.yml+ @@ -43,8 +49,17 @@ To specify the same settings at the command line, you use: -M "nginx.access.var.paths=[/path/to/log/nginx/access.log*]" -M "nginx.error.var.paths=[/path/to/log/nginx/error.log*]" ----- +The following example shows how to configure `ingress_controller` fileset which can be used in Kubernetes environments +to parse ingress-nginx logs: + +["source","yaml",subs="attributes"] +----- +- module: nginx + ingress_controller: + enabled: true + var.paths: ["/path/to/log/nginx/ingress.log"] +----- - //set the fileset name used in the included example :fileset_ex: access @@ -61,6 +76,11 @@ include::../include/var-paths.asciidoc[] include::../include/var-paths.asciidoc[] +[float] +==== `ingress_controller` log fileset + +include::../include/var-paths.asciidoc[] + include::../include/timezone-support.asciidoc[] [float]