Skip to content

Conversation

alexandra5000
Copy link
Contributor

This PR adds a new reference page under /solutions/observability/logs/ that documents the default component templates applied to logs data streams.

Closes #1863

Comment on lines +65 to +72
```json
PUT _index_template/my-logs-template
{
"index_patterns": ["my-logs-template"],
"composed_of": ["ecs@mappings", "logs@mappings", "logs@settings"],
"priority": 200
}
```
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Example based on content from this page.

Copy link

github-actions bot commented Aug 25, 2025

Copy link
Contributor

@mdbirnstiehl mdbirnstiehl left a comment

Choose a reason for hiding this comment

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

Nice work, and thanks for putting this together! I've added a few suggestions, let me know if you have any questions or concerns, and I'll be happy to discuss.

Copy link
Contributor

@gbamparop gbamparop left a comment

Choose a reason for hiding this comment

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

Thanks for working on this! Added some minor comments


* Sets `@timestamp` to ingest time if missing.
* Contains a hook to the optional [`logs@custom`](#customize-preprocessing-with-logscustom) pipeline.
* Sets `ignore_malformed` to `true` globally. With this setting, documents with malformed fields can be indexed without causing ingestion failures. Refer to [ignore_malformed](elasticsearch://reference/elasticsearch/mapping-reference/ignore-malformed.md) for a list of supported fields.
Copy link
Contributor

Choose a reason for hiding this comment

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

It also includes ignore_dynamic_beyond_limit.

image

* Defines ECS `data_stream.*` fields:
* `data_stream.type`: constant_keyword, value `logs`
* `data_stream.dataset`: constant_keyword, for example `nginx.access` (must be ≤ 100 characters, no `-`)
* `data_stream.namespace`: constant_keyword, for example `production` (must be ≤ 100 characters, no `-`)
Copy link
Contributor

Choose a reason for hiding this comment

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


Configures default index settings for logs data streams:

* Sets `@timestamp` to ingest time if missing.
Copy link
Contributor

Choose a reason for hiding this comment

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

The component template references a default pipeline (logs@default-pipeline) which in turn sets @timestamp if missing.

image

Configures default index settings for logs data streams:

* Sets `@timestamp` to ingest time if missing.
* Contains a hook to the optional [`logs@custom`](#customize-preprocessing-with-logscustom) pipeline.
Copy link
Contributor

Choose a reason for hiding this comment

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

The logs@default-pipeline ingest pipeline contains a hook to the logs@custom ingest pipeline


Elastic applies a managed index template to data streams that follow the `logs-*-*` index pattern. This index template references a set of reusable component templates and an optional `@custom` ingest pipeline that standardizes how log data streams are mapped, indexed, and preprocessed.

The managed `logs` index template has a priority of `100` and is automatically applied to any data stream following the `logs-*-*` index pattern, unless you override it with your own higher-priority index template.
Copy link
Contributor

Choose a reason for hiding this comment

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

LogsDB is also enabled in this index template

image

@gbamparop
Copy link
Contributor

@LucaWintergerst can you please have a look? The last part encourages users to follow the logs-*-* naming pattern. Should we also mention Streams as the new way to ingest data and point to the documentation?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Document log processors and component templates
3 participants