Skip to content

Commit

Permalink
Merge branch '8.11' into mergify/bp/8.11/pr-12131
Browse files Browse the repository at this point in the history
  • Loading branch information
mergify[bot] authored Dec 4, 2023
2 parents 1c03174 + 2ef882f commit cd06607
Show file tree
Hide file tree
Showing 6 changed files with 41 additions and 12 deletions.
4 changes: 2 additions & 2 deletions NOTICE.txt
Original file line number Diff line number Diff line change
Expand Up @@ -573,11 +573,11 @@ Contents of probable licence file $GOMODCACHE/github.com/elastic/[email protected]

--------------------------------------------------------------------------------
Dependency : github.com/elastic/beats/v7
Version: v7.0.0-alpha2.0.20231129140234-9a93c21c218c
Version: v7.0.0-alpha2.0.20231204122024-b30a5ec82af0
Licence type (autodetected): Elastic
--------------------------------------------------------------------------------

Contents of probable licence file $GOMODCACHE/github.com/elastic/beats/[email protected].20231129140234-9a93c21c218c/LICENSE.txt:
Contents of probable licence file $GOMODCACHE/github.com/elastic/beats/[email protected].20231204122024-b30a5ec82af0/LICENSE.txt:

Source code in this repository is variously licensed under the Apache License
Version 2.0, an Apache compatible license, or the Elastic License. Outside of
Expand Down
43 changes: 36 additions & 7 deletions docs/custom-index-template.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ These index templates are composed of multiple component templates--reusable bui
that configure index mappings, settings, and aliases.

The default APM index templates can be viewed in {kib}.
Navigate to **{stack-manage-app}** > **Index Management** > **Index Templates**, and search for `apm`.
Navigate to **{stack-manage-app}** **Index Management** **Index Templates**, and search for `apm`.
Select any of the APM index templates to view their relevant component templates.

[discrete]
Expand All @@ -30,21 +30,27 @@ When you install the APM integration, {fleet} creates a default `@custom` compon
You can edit this `@custom` component template to customize your {es} indices.

First, determine which <<apm-data-streams,data stream>> you'd like to edit.
Then, open {kib} and navigate to **{stack-manage-app}** > **Index Management** > **Component Templates**.
Then, open {kib} and navigate to **{stack-manage-app}** **Index Management** **Component Templates**.

Custom component templates are named following this pattern: `<name_of_data_stream>@custom`.
Search for the name of the data stream, like `traces-apm`, and select its custom component template.
In this example, that'd be, `traces-apm@custom`.
Then click **Manage** > **Edit**.
Then click **Manage** **Edit**.

Add any custom index settings, metadata, or mappings.
For example, you may want to...
Add any custom metadata, index settings, or mappings.

[discrete]
[[custom-index-template-index-settings]]
==== Index settings

In the **Index settings** step, you can specify custom {ref}/index-modules.html#index-modules-settings[index settings].
For example, you could:

* Customize the index lifecycle policy applied to a data stream.
See <<data-streams-custom-policy,custom index lifecycle policies>> for a walk-through.

* Change the number of {ref}/scalability.html[shards] per index.
Specify the number of primary shards in the **index settings**:
Specify the number of primary shards:
+
[source,json]
----
Expand All @@ -56,7 +62,7 @@ Specify the number of primary shards in the **index settings**:
----

* Change the number of {ref}/docs-replication.html[replicas] per index.
Specify the number of replica shards in the **index settings**:
Specify the number of replica shards:
+
[source,json]
----
Expand All @@ -67,6 +73,29 @@ Specify the number of replica shards in the **index settings**:
}
----

[discrete]
[[custom-index-template-mappings]]
==== Mappings

{ref}/mapping.html[Mapping] is the process of defining how a document, and the fields it contains, are stored and indexed.
In the *Mappings* step, you can add custom field mappings.
For example, you could:

* Add custom field mappings that you can index on and search.
In the *Mapped fields* tab, add a new field including the {ref}/mapping-types.html[field type]:
+
image::images/custom-index-template-mapped-fields.png[Editing a component template to add a new mapped field]

* Add a {ref}/runtime.html[runtime field] that is evaluated at query time.
In the *Runtime fields* tab, click *Create runtime field* and provide a field name,
type, and optionally a script:
+
image::images/custom-index-template-runtime-fields.png[Editing a component template to add a new runtime field]

[discrete]
[[custom-index-template-rollover]]
=== Roll over the data stream

Changes to component templates are not applied retroactively to existing indices.
For changes to take effect, you must create a new write index for the data stream.
This can be done with the {es} {ref}/indices-rollover-index.html[Rollover API].
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ require (
github.com/dustin/go-humanize v1.0.1
github.com/elastic/apm-aggregation v0.0.0-20230815024520-e75a37d9ddd6
github.com/elastic/apm-data v0.1.1-0.20230928144734-40b63726f3b7
github.com/elastic/beats/v7 v7.0.0-alpha2.0.20231129140234-9a93c21c218c
github.com/elastic/beats/v7 v7.0.0-alpha2.0.20231204122024-b30a5ec82af0
github.com/elastic/elastic-agent-client/v7 v7.4.0
github.com/elastic/elastic-agent-libs v0.6.2
github.com/elastic/elastic-agent-system-metrics v0.8.2
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -136,8 +136,8 @@ github.com/elastic/apm-aggregation v0.0.0-20230815024520-e75a37d9ddd6 h1:Js+C3HE
github.com/elastic/apm-aggregation v0.0.0-20230815024520-e75a37d9ddd6/go.mod h1:ba3gaJCuhxXN/O5AuiI56xxd6DukQdVOK0NfpzBntNo=
github.com/elastic/apm-data v0.1.1-0.20230928144734-40b63726f3b7 h1:QcfCHAh1bHj9WN6y75bD6mBlIIlz9dJVKJSJVXCu4TM=
github.com/elastic/apm-data v0.1.1-0.20230928144734-40b63726f3b7/go.mod h1:lMTMoCWNadiDJih/tLechuMTtumEeedtKJlBOYAv030=
github.com/elastic/beats/v7 v7.0.0-alpha2.0.20231129140234-9a93c21c218c h1:ngARH1pZ3zP5nf1SnNRfBhewDSemoWOaPj/Y0y2A9S0=
github.com/elastic/beats/v7 v7.0.0-alpha2.0.20231129140234-9a93c21c218c/go.mod h1:yIwy1g6P8eX/AmxB1qu86PC+HxH6VTAyE4Jnjb9TkoE=
github.com/elastic/beats/v7 v7.0.0-alpha2.0.20231204122024-b30a5ec82af0 h1:2+kLmovv8rWdK4A0zH8XBGlEUQy0fXOlSy/DfcGwq6c=
github.com/elastic/beats/v7 v7.0.0-alpha2.0.20231204122024-b30a5ec82af0/go.mod h1:tyPnUi2tTvUlfby7/yBWoDvibj5DKidutSS2GItT6qM=
github.com/elastic/elastic-agent-autodiscover v0.6.4 h1:K+xC7OGgcy4fLXVuGgOGLs+eXCqRnRg2SQQinxP+KsA=
github.com/elastic/elastic-agent-autodiscover v0.6.4/go.mod h1:5+7NIBAILc0GkgxYW3ckXncu5wRZfltZhTY4aZAYP4M=
github.com/elastic/elastic-agent-client/v7 v7.4.0 h1:h75oTkkvIjgiKVm61NpvTZP4cy6QbQ3zrIpXKGigyjo=
Expand Down

0 comments on commit cd06607

Please sign in to comment.