From a9be1b56a8497b43acdea1dc63be5024470ce876 Mon Sep 17 00:00:00 2001 From: Chris Mark Date: Mon, 25 May 2020 13:22:26 +0300 Subject: [PATCH] Add clarification about indexers/matchers in add_kubernetes_metadata (#18714) --- .../docs/add_kubernetes_metadata.asciidoc | 20 +++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/libbeat/processors/add_kubernetes_metadata/docs/add_kubernetes_metadata.asciidoc b/libbeat/processors/add_kubernetes_metadata/docs/add_kubernetes_metadata.asciidoc index a862ba422626..f66254cbd60c 100644 --- a/libbeat/processors/add_kubernetes_metadata/docs/add_kubernetes_metadata.asciidoc +++ b/libbeat/processors/add_kubernetes_metadata/docs/add_kubernetes_metadata.asciidoc @@ -53,16 +53,24 @@ examples in <>. The configuration below enables the processor when {beatname_lc} is run as a pod in Kubernetes. -[source,yaml] +[source,yaml,subs="attributes+"] ------------------------------------------------------------------------------- processors: - add_kubernetes_metadata: +ifndef::kubernetes_default_indexers[] + # Defining indexers and matchers manually is required for {beatname_lc}, for instance: + #indexers: + # - ip_port: + #matchers: + # - fields: + # lookup_fields: ["metricset.host"] +endif::kubernetes_default_indexers[] ------------------------------------------------------------------------------- The configuration below enables the processor on a Beat running as a process on the Kubernetes node. -[source,yaml] +[source,yaml,subs="attributes+"] ------------------------------------------------------------------------------- processors: - add_kubernetes_metadata: @@ -70,6 +78,14 @@ processors: # If kube_config is not set, KUBECONFIG environment variable will be checked # and if not present it will fall back to InCluster kube_config: ${HOME}/.kube/config +ifndef::kubernetes_default_indexers[] + # Defining indexers and matchers manually is required for {beatname_lc}, for instance: + #indexers: + # - ip_port: + #matchers: + # - fields: + # lookup_fields: ["metricset.host"] +endif::kubernetes_default_indexers[] ------------------------------------------------------------------------------- The configuration below has the default indexers and matchers disabled and