mirror of
https://github.com/elastic/elasticsearch.git
synced 2025-04-25 15:47:23 -04:00
[DOCS] Add admon for built-in index templates (#61063)
Adds an important admonition for the built-in `metrics-*-*` and `logs-*-*` index templates. Updates several put index template snippets to include a priority.
This commit is contained in:
parent
fdc867e395
commit
cd6304ae6b
5 changed files with 62 additions and 1 deletions
|
@ -102,6 +102,7 @@ PUT /_index_template/my-data-stream-template
|
|||
{
|
||||
"index_patterns": [ "my-data-stream*" ],
|
||||
"data_stream": { },
|
||||
"priority": 200,
|
||||
"template": {
|
||||
"mappings": {
|
||||
"properties": {
|
||||
|
@ -184,6 +185,7 @@ PUT /_index_template/my-data-stream-template
|
|||
{
|
||||
"index_patterns": [ "my-data-stream*" ],
|
||||
"data_stream": { },
|
||||
"priority": 200,
|
||||
"template": {
|
||||
"mappings": {
|
||||
"properties": {
|
||||
|
@ -288,6 +290,7 @@ PUT /_index_template/my-data-stream-template
|
|||
{
|
||||
"index_patterns": [ "my-data-stream*" ],
|
||||
"data_stream": { },
|
||||
"priority": 200,
|
||||
"template": {
|
||||
"settings": {
|
||||
"index.refresh_interval": "30s" <1>
|
||||
|
@ -341,6 +344,7 @@ PUT /_index_template/my-data-stream-template
|
|||
{
|
||||
"index_patterns": [ "my-data-stream*" ],
|
||||
"data_stream": { },
|
||||
"priority": 200,
|
||||
"template": {
|
||||
"settings": {
|
||||
"sort.field": [ "@timestamp"], <1>
|
||||
|
@ -442,6 +446,7 @@ PUT /_index_template/new-data-stream-template
|
|||
{
|
||||
"index_patterns": [ "new-data-stream*" ],
|
||||
"data_stream": { },
|
||||
"priority": 200,
|
||||
"template": {
|
||||
"mappings": {
|
||||
"properties": {
|
||||
|
|
|
@ -106,6 +106,21 @@ template for a data stream must specify:
|
|||
|
||||
* That the template is used exclusively for data streams.
|
||||
|
||||
* A priority for the template.
|
||||
|
||||
[IMPORTANT]
|
||||
====
|
||||
{es} has built-in index templates for the `metrics-*-*` and `logs-*-*` index
|
||||
patterns. {ingest-guide}/ingest-management-overview.html[{agent}] uses these
|
||||
templates to create data streams. If you use {agent}, assign your index
|
||||
templates a priority lower than `100` to avoid an override of the built-in
|
||||
templates.
|
||||
|
||||
Otherwise, to avoid accidentally applying the built-in templates, use a
|
||||
non-overlapping index pattern, or assign your templates a `priority` higher or
|
||||
lower than `100`.
|
||||
====
|
||||
|
||||
Every document indexed to a data stream must have a `@timestamp` field. This
|
||||
field can be mapped as a <<date,`date`>> or <<date_nanos,`date_nanos`>> field
|
||||
data type by the stream's index template. This mapping can include other
|
||||
|
@ -146,6 +161,7 @@ PUT /_index_template/my-data-stream-template
|
|||
{
|
||||
"index_patterns": [ "my-data-stream*" ],
|
||||
"data_stream": { },
|
||||
"priority": 200,
|
||||
"template": {
|
||||
"settings": {
|
||||
"index.lifecycle.name": "my-data-stream-policy"
|
||||
|
@ -163,6 +179,7 @@ PUT /_index_template/my-data-stream-template
|
|||
{
|
||||
"index_patterns": [ "my-data-stream*" ],
|
||||
"data_stream": { },
|
||||
"priority": 200,
|
||||
"template": {
|
||||
"mappings": {
|
||||
"properties": {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue