Skip to content
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

Add reference documentation about indexers and matchers #17139

Merged
merged 3 commits into from
Mar 31, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions filebeat/docs/index.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ include::{asciidoc-dir}/../../shared/attributes.asciidoc[]
:docker_platform:
:win_os:

:kubernetes_default_indexers: {docdir}/kubernetes-default-indexers-matchers.asciidoc

include::{libbeat-dir}/shared-beats-attributes.asciidoc[]

include::./overview.asciidoc[]
Expand Down
14 changes: 14 additions & 0 deletions filebeat/docs/kubernetes-default-indexers-matchers.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
When `add_kubernetes_metadata` is used with {beatname_uc}, it uses the
`container` indexer and the `logs_path`. So events whose path in `log.file.path`
contains a reference to a container ID are enriched with metadata of the pod of
this container.

This behaviour can be disabled disabling default indexers and matchers in the
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

minor but maybe a by is needed here:

Suggested change
This behaviour can be disabled disabling default indexers and matchers in the
This behaviour can be disabled by disabling default indexers and matchers in the

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Better, yes, thanks!

configuration:
[source,yaml]
-------------------------------------------------------------------------------
processors:
- add_kubernetes_metadata:
default_indexers.enabled: false
default_matchers.enabled: false
-------------------------------------------------------------------------------
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,16 @@ value of the field `metricset.host`. When one of this lookup keys match with one
of the identifiers, the event is enriched with the metadata of the identified
pod.

ifdef::kubernetes_default_indexers[]
include::{kubernetes_default_indexers}[]
endif::kubernetes_default_indexers[]
ifndef::kubernetes_default_indexers[]
Each Beat can define its own default indexers and matchers which are enabled by
default. For example, Filebeat enables the `container` indexer, which identifies
pod metadata based on all container IDs, and a `logs_path` matcher, which takes
the `log.file.path` field, extracts the container ID, and uses it to retrieve
metadata.
endif::kubernetes_default_indexers[]

You can find more information about the available indexers and matchers, and some
examples in <<kubernetes-indexers-and-matchers>>.
Expand Down
2 changes: 2 additions & 0 deletions metricbeat/docs/index.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ include::{asciidoc-dir}/../../shared/attributes.asciidoc[]
:no_decode_csv_fields_processor:
:no_timestamp_processor:

:kubernetes_default_indexers: {docdir}/kubernetes-default-indexers-matchers.asciidoc

include::{libbeat-dir}/shared-beats-attributes.asciidoc[]

include::./overview.asciidoc[]
Expand Down
14 changes: 14 additions & 0 deletions metricbeat/docs/kubernetes-default-indexers-matchers.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
When `add_kubernetes_metadata` is used with {beatname_uc}, it uses the `ip_port`
indexer and the `fields` matcher with the `metricset.host` field. So events that
contain a `metricset.host` field are enriched with metadata of the pods that
exposes the same port in the same IP.

This behaviour can be disabled disabling default indexers and matchers in the
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

minor but maybe a by is needed here:

Suggested change
This behaviour can be disabled disabling default indexers and matchers in the
This behaviour can be disabled by disabling default indexers and matchers in the

configuration:
[source,yaml]
-------------------------------------------------------------------------------
processors:
- add_kubernetes_metadata:
default_indexers.enabled: false
default_matchers.enabled: false
-------------------------------------------------------------------------------