-
Notifications
You must be signed in to change notification settings - Fork 25k
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
Support custom metadata on Data Streams #59195
Comments
Pinging @elastic/es-core-features (:Core/Features/Data streams) |
We need this as well for the changes in elastic/kibana#71419. |
We first need to support |
@dakrone what do you mean with support I thought it is already supported. Kibana uses that feature in the |
Mappings metadata is more thought of as metadata about the mappings themselves, not the index (at least that's they way I think about it). It would work for now, but I don't think we should use it as a general purpose metadata storage for the index. |
@dakrone I agree! Thank you for explaining! |
@dakrone Hi Lee, I was wondering if there is any work planned on adding metadata to data streams? I see now that we have
in both index templates mappings and index mappings if they were created by ingest manager. |
@yuliacech it's still something we'd like to do, but I don't think it has anyone currently working on adding it. |
I think this is something that we can pickup in the near future. When a data stream is created then custom data stream metadata should be sourced from the matching composable index template and be added to the data stream under the I do have a question about from where the data stream custom metadata is sourced. Should all the keys under the current Also is there a need to update a data stream's custom metadata after its creation? Currently there isn't a data stream update api or something similar. |
Hi @martijnvg, thanks a lot for getting back to me on this! |
@yuliacech Besides the mentioned keys, would it be okay if other keys also appear on a data stream? More specifically i'm wondering whether there is a need for custom meta keys to only be associated with a data stream or if it is okay if all custom meta data keys from the composable template appear on a data stream and in other places. |
@martijnvg additional keys should not be a problem for UI, I think we can safely ignore them and only use the ones for managed info. |
@yuliacech that is good to know. That will simplify the change that we need to make. |
I'm not aware of a need at this time. |
Composable index template may hold custom metadata. This change adds behaviour that when a data stream gets created the custom metadata of the matching composable index template is copied to new data stream. The get data stream api can then be used to view the custom metadata. Example: ``` PUT /_index_template/my-logs-template { "index_patterns": [ "logs-*" ], "data_stream": { }, "template": { "settings": { "index.number_of_replicas": 0 } }, "_meta": { "managed": true } } PUT /_data_stream/logs-myapp GET /_data_stream ``` The get data stream api then yields the following response: ``` { "data_streams": [ { "name": "logs-myapp", "timestamp_field": { "name": "@timestamp" }, "indices": [ { "index_name": ".ds-logs-myapp-000001", "index_uuid": "3UaBxM3mQXuHR6qx0IDVCw" } ], "generation": 1, "_meta": { "managed": true }, "status": "GREEN", "template": "my-logs-template" } ] } ``` Closes elastic#59195
Composable index template may hold custom metadata. This change adds behaviour that when a data stream gets created the custom metadata of the matching composable index template is copied to new data stream. The get data stream api can then be used to view the custom metadata. Example: ``` PUT /_index_template/my-logs-template { "index_patterns": [ "logs-*" ], "data_stream": { }, "template": { "settings": { "index.number_of_replicas": 0 } }, "_meta": { "managed": true } } PUT /_data_stream/logs-myapp GET /_data_stream ``` The get data stream api then yields the following response: ``` { "data_streams": [ { "name": "logs-myapp", "timestamp_field": { "name": "@timestamp" }, "indices": [ { "index_name": ".ds-logs-myapp-000001", "index_uuid": "3UaBxM3mQXuHR6qx0IDVCw" } ], "generation": 1, "_meta": { "managed": true }, "status": "GREEN", "template": "my-logs-template" } ] } ``` Closes #59195
Composable index template may hold custom metadata. This change adds behaviour that when a data stream gets created the custom metadata of the matching composable index template is copied to new data stream. The get data stream api can then be used to view the custom metadata. Example: ``` PUT /_index_template/my-logs-template { "index_patterns": [ "logs-*" ], "data_stream": { }, "template": { "settings": { "index.number_of_replicas": 0 } }, "_meta": { "managed": true } } PUT /_data_stream/logs-myapp GET /_data_stream ``` The get data stream api then yields the following response: ``` { "data_streams": [ { "name": "logs-myapp", "timestamp_field": { "name": "@timestamp" }, "indices": [ { "index_name": ".ds-logs-myapp-000001", "index_uuid": "3UaBxM3mQXuHR6qx0IDVCw" } ], "generation": 1, "_meta": { "managed": true }, "status": "GREEN", "template": "my-logs-template" } ] } ``` Closes elastic#59195
Composable index template may hold custom metadata. This change adds behaviour that when a data stream gets created the custom metadata of the matching composable index template is copied to new data stream. The get data stream api can then be used to view the custom metadata. Example: ``` PUT /_index_template/my-logs-template { "index_patterns": [ "logs-*" ], "data_stream": { }, "template": { "settings": { "index.number_of_replicas": 0 } }, "_meta": { "managed": true } } PUT /_data_stream/logs-myapp GET /_data_stream ``` The get data stream api then yields the following response: ``` { "data_streams": [ { "name": "logs-myapp", "timestamp_field": { "name": "@timestamp" }, "indices": [ { "index_name": ".ds-logs-myapp-000001", "index_uuid": "3UaBxM3mQXuHR6qx0IDVCw" } ], "generation": 1, "_meta": { "managed": true }, "status": "GREEN", "template": "my-logs-template" } ] } ``` Closes #59195
The intention behind this feature is to enable the UI to identify the data streams created by Ingest Manager. We'll need to implement a solution that allows index templates to define the metadata that is applied to the data streams that they create.
The text was updated successfully, but these errors were encountered: