Skip to content

Commit

Permalink
Add clarification about indexers/matchers in add_kubernetes_metadata (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrsMark authored May 25, 2020
1 parent da2c4ed commit a9be1b5
Showing 1 changed file with 18 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -53,23 +53,39 @@ examples in <<kubernetes-indexers-and-matchers>>.
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:
host: <hostname>
# 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
Expand Down

0 comments on commit a9be1b5

Please sign in to comment.