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

[Index Management] Display index mode of data streams depending on logsdb.enabled cluster setting #207131

Merged

Conversation

ElenaStoeva
Copy link
Contributor

@ElenaStoeva ElenaStoeva commented Jan 17, 2025

Closes #206126

Summary

This PR displays a LogsDB index mode for logs-*-* data streams and templates with the logs-*-* index pattern if the cluster.logsdb.enabled setting is set to true and as "Standard" if it's set to false. If the setting is not set, it is false by default in stateful (and so "Standard" index mode) and true by default in serverless (and so "LogsDB" index mode).

How to test:
In Stateful:

  1. Create an index template with a logs-*-* index pattern
  2. Create a logs-*-* data stream: PUT _data_stream/logs-test-1
  3. Go to Index Management -> Index templates and click on the created index templates. Verify that the index mode is correct (NOTE: In stateful, the cluster.logsdb.enabled setting is false by default, while in serverless it's true by default. Therefore, the index mode should be Standard in stateful and LogsDB in serverless.
  4. Go to Index Management -> Data Streams and find the created data stream. Verify that the index mode is correct (NOTE: In stateful, the cluster.logsdb.enabled setting is false by default, while in serverless it's true by default. Therefore, the index mode should be Standard in stateful and LogsDB in serverless.
  5. In Console, set the cluster.logsdb.enabled setting:
PUT /_cluster/settings
{
  "persistent" : {
    "cluster.logsdb.enabled" : true
  }
}
  1. Go to the data stream/templates list and verify that the index mode of the test data stream/template that we created is displayed as LogsDB
  2. Change the cluster setting to false and verify that the index mode is now displayed as Standard.

@ElenaStoeva ElenaStoeva added Feature:Index Management Index and index templates UI Team:Kibana Management Dev Tools, Index Management, Upgrade Assistant, ILM, Ingest Node Pipelines, and more release_note:skip Skip the PR/issue when compiling release notes backport:prev-minor Backport to (8.x) the previous minor version (i.e. one version back from main) labels Jan 17, 2025
@ElenaStoeva ElenaStoeva self-assigned this Jan 17, 2025
@ElenaStoeva ElenaStoeva force-pushed the data-streams-logsdb-cluster-setting branch from 6324fd6 to bfafc18 Compare January 20, 2025 14:26
@ElenaStoeva ElenaStoeva marked this pull request as ready for review January 21, 2025 12:51
@ElenaStoeva ElenaStoeva requested a review from a team as a code owner January 21, 2025 12:51
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-management (Team:Kibana Management)

@ElenaStoeva ElenaStoeva force-pushed the data-streams-logsdb-cluster-setting branch from 8d6df30 to 86b4449 Compare January 21, 2025 15:11
@ElenaStoeva ElenaStoeva force-pushed the data-streams-logsdb-cluster-setting branch 2 times, most recently from b6b361c to 089a185 Compare January 22, 2025 15:09
@SoniaSanzV SoniaSanzV self-requested a review January 22, 2025 15:30
@ElenaStoeva ElenaStoeva force-pushed the data-streams-logsdb-cluster-setting branch from 089a185 to 452db2e Compare January 22, 2025 15:45
Copy link
Member

@sabarasaba sabarasaba left a comment

Choose a reason for hiding this comment

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

Tested locally and all works well, code changes lgtm. Thanks for adding all those tests too!

@ElenaStoeva ElenaStoeva requested a review from a team as a code owner January 23, 2025 13:19
Copy link
Member

@wayneseymour wayneseymour left a comment

Choose a reason for hiding this comment

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

x-pack/test_serverless/api_integration/services/index_management/svl_templates.helpers.ts LGTM

@SoniaSanzV SoniaSanzV removed their request for review January 24, 2025 10:56
@elasticmachine
Copy link
Contributor

elasticmachine commented Jan 24, 2025

💔 Build Failed

Failed CI Steps

Test Failures

  • [job] [logs] FTR Configs #96 / Fleet Endpoints fleet_proxies_crud PUT /proxies/{itemId} should allow to update an existing fleet proxy
  • [job] [logs] FTR Configs #96 / Fleet Endpoints fleet_proxies_crud PUT /proxies/{itemId} should allow to update an existing fleet proxy
  • [job] [logs] Jest Tests #15 / RegisteredAttachmentsPropertyActions renders the correct number of actions

Metrics [docs]

✅ unchanged

History

cc @ElenaStoeva

@ElenaStoeva ElenaStoeva merged commit b08eaa7 into elastic:main Jan 24, 2025
8 checks passed
@kibanamachine
Copy link
Contributor

Starting backport for target branches: 8.x

https://github.com/elastic/kibana/actions/runs/12958252343

kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Jan 24, 2025
…ogsdb.enabled` cluster setting (elastic#207131)

Closes elastic#206126

## Summary

This PR displays a LogsDB index mode for `logs-*-*` data streams and
templates with the `logs-*-*` index pattern if the
`cluster.logsdb.enabled` setting is set to true and as "Standard" if
it's set to false. If the setting is not set, it is false by default in
stateful (and so "Standard" index mode) and true by default in
serverless (and so "LogsDB" index mode).

**How to test:**
In Stateful:
1. Create an index template with a `logs-*-*` index pattern
2. Create a `logs-*-*` data stream: `PUT _data_stream/logs-test-1`
3. Go to Index Management -> Index templates and click on the created
index templates. Verify that the index mode is correct (**NOTE:** In
stateful, the `cluster.logsdb.enabled` setting is `false` by default,
while in serverless it's `true` by default. Therefore, the index mode
should be `Standard` in stateful and `LogsDB` in serverless.
4. Go to Index Management -> Data Streams and find the created data
stream. Verify that the index mode is correct (**NOTE:** In stateful,
the `cluster.logsdb.enabled` setting is `false` by default, while in
serverless it's `true` by default. Therefore, the index mode should be
`Standard` in stateful and `LogsDB` in serverless.
5. In Console, set the `cluster.logsdb.enabled` setting:
```
PUT /_cluster/settings
{
  "persistent" : {
    "cluster.logsdb.enabled" : true
  }
}
```
6. Go to the data stream/templates list and verify that the index mode
of the test data stream/template that we created is displayed as LogsDB
7. Change the cluster setting to `false` and verify that the index mode
is now displayed as Standard.

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
(cherry picked from commit b08eaa7)
@kibanamachine
Copy link
Contributor

💚 All backports created successfully

Status Branch Result
8.x

Note: Successful backport PRs will be merged automatically after passing CI.

Questions ?

Please refer to the Backport tool documentation

kibanamachine added a commit that referenced this pull request Jan 24, 2025
… on &#x60;logsdb.enabled&#x60; cluster setting (#207131) (#208281)

# Backport

This will backport the following commits from `main` to `8.x`:
- [[Index Management] Display index mode of data streams depending on
&#x60;logsdb.enabled&#x60; cluster setting
(#207131)](#207131)

<!--- Backport version: 9.4.3 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Elena
Stoeva","email":"59341489+ElenaStoeva@users.noreply.github.com"},"sourceCommit":{"committedDate":"2025-01-24T21:55:16Z","message":"[Index
Management] Display index mode of data streams depending on
`logsdb.enabled` cluster setting (#207131)\n\nCloses
https://github.com/elastic/kibana/issues/206126\r\n\r\n##
Summary\r\n\r\nThis PR displays a LogsDB index mode for `logs-*-*` data
streams and\r\ntemplates with the `logs-*-*` index pattern if
the\r\n`cluster.logsdb.enabled` setting is set to true and as
\"Standard\" if\r\nit's set to false. If the setting is not set, it is
false by default in\r\nstateful (and so \"Standard\" index mode) and
true by default in\r\nserverless (and so \"LogsDB\" index
mode).\r\n\r\n**How to test:**\r\nIn Stateful:\r\n1. Create an index
template with a `logs-*-*` index pattern\r\n2. Create a `logs-*-*` data
stream: `PUT _data_stream/logs-test-1`\r\n3. Go to Index Management ->
Index templates and click on the created\r\nindex templates. Verify that
the index mode is correct (**NOTE:** In\r\nstateful, the
`cluster.logsdb.enabled` setting is `false` by default,\r\nwhile in
serverless it's `true` by default. Therefore, the index mode\r\nshould
be `Standard` in stateful and `LogsDB` in serverless.\r\n4. Go to Index
Management -> Data Streams and find the created data\r\nstream. Verify
that the index mode is correct (**NOTE:** In stateful,\r\nthe
`cluster.logsdb.enabled` setting is `false` by default, while
in\r\nserverless it's `true` by default. Therefore, the index mode
should be\r\n`Standard` in stateful and `LogsDB` in serverless.\r\n5. In
Console, set the `cluster.logsdb.enabled` setting: \r\n```\r\nPUT
/_cluster/settings\r\n{\r\n \"persistent\" : {\r\n
\"cluster.logsdb.enabled\" : true\r\n }\r\n}\r\n```\r\n6. Go to the data
stream/templates list and verify that the index mode\r\nof the test data
stream/template that we created is displayed as LogsDB\r\n7. Change the
cluster setting to `false` and verify that the index mode\r\nis now
displayed as Standard.\r\n\r\n---------\r\n\r\nCo-authored-by:
kibanamachine
<42973632+kibanamachine@users.noreply.github.com>","sha":"b08eaa7d5a170436d75ae909972bdd6770dea3b3","branchLabelMapping":{"^v9.0.0$":"main","^v8.18.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Feature:Index
Management","Team:Kibana
Management","release_note:skip","v9.0.0","backport:prev-minor","v8.18.0"],"title":"[Index
Management] Display index mode of data streams depending on
`logsdb.enabled` cluster
setting","number":207131,"url":"https://github.com/elastic/kibana/pull/207131","mergeCommit":{"message":"[Index
Management] Display index mode of data streams depending on
`logsdb.enabled` cluster setting (#207131)\n\nCloses
https://github.com/elastic/kibana/issues/206126\r\n\r\n##
Summary\r\n\r\nThis PR displays a LogsDB index mode for `logs-*-*` data
streams and\r\ntemplates with the `logs-*-*` index pattern if
the\r\n`cluster.logsdb.enabled` setting is set to true and as
\"Standard\" if\r\nit's set to false. If the setting is not set, it is
false by default in\r\nstateful (and so \"Standard\" index mode) and
true by default in\r\nserverless (and so \"LogsDB\" index
mode).\r\n\r\n**How to test:**\r\nIn Stateful:\r\n1. Create an index
template with a `logs-*-*` index pattern\r\n2. Create a `logs-*-*` data
stream: `PUT _data_stream/logs-test-1`\r\n3. Go to Index Management ->
Index templates and click on the created\r\nindex templates. Verify that
the index mode is correct (**NOTE:** In\r\nstateful, the
`cluster.logsdb.enabled` setting is `false` by default,\r\nwhile in
serverless it's `true` by default. Therefore, the index mode\r\nshould
be `Standard` in stateful and `LogsDB` in serverless.\r\n4. Go to Index
Management -> Data Streams and find the created data\r\nstream. Verify
that the index mode is correct (**NOTE:** In stateful,\r\nthe
`cluster.logsdb.enabled` setting is `false` by default, while
in\r\nserverless it's `true` by default. Therefore, the index mode
should be\r\n`Standard` in stateful and `LogsDB` in serverless.\r\n5. In
Console, set the `cluster.logsdb.enabled` setting: \r\n```\r\nPUT
/_cluster/settings\r\n{\r\n \"persistent\" : {\r\n
\"cluster.logsdb.enabled\" : true\r\n }\r\n}\r\n```\r\n6. Go to the data
stream/templates list and verify that the index mode\r\nof the test data
stream/template that we created is displayed as LogsDB\r\n7. Change the
cluster setting to `false` and verify that the index mode\r\nis now
displayed as Standard.\r\n\r\n---------\r\n\r\nCo-authored-by:
kibanamachine
<42973632+kibanamachine@users.noreply.github.com>","sha":"b08eaa7d5a170436d75ae909972bdd6770dea3b3"}},"sourceBranch":"main","suggestedTargetBranches":["8.x"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/207131","number":207131,"mergeCommit":{"message":"[Index
Management] Display index mode of data streams depending on
`logsdb.enabled` cluster setting (#207131)\n\nCloses
https://github.com/elastic/kibana/issues/206126\r\n\r\n##
Summary\r\n\r\nThis PR displays a LogsDB index mode for `logs-*-*` data
streams and\r\ntemplates with the `logs-*-*` index pattern if
the\r\n`cluster.logsdb.enabled` setting is set to true and as
\"Standard\" if\r\nit's set to false. If the setting is not set, it is
false by default in\r\nstateful (and so \"Standard\" index mode) and
true by default in\r\nserverless (and so \"LogsDB\" index
mode).\r\n\r\n**How to test:**\r\nIn Stateful:\r\n1. Create an index
template with a `logs-*-*` index pattern\r\n2. Create a `logs-*-*` data
stream: `PUT _data_stream/logs-test-1`\r\n3. Go to Index Management ->
Index templates and click on the created\r\nindex templates. Verify that
the index mode is correct (**NOTE:** In\r\nstateful, the
`cluster.logsdb.enabled` setting is `false` by default,\r\nwhile in
serverless it's `true` by default. Therefore, the index mode\r\nshould
be `Standard` in stateful and `LogsDB` in serverless.\r\n4. Go to Index
Management -> Data Streams and find the created data\r\nstream. Verify
that the index mode is correct (**NOTE:** In stateful,\r\nthe
`cluster.logsdb.enabled` setting is `false` by default, while
in\r\nserverless it's `true` by default. Therefore, the index mode
should be\r\n`Standard` in stateful and `LogsDB` in serverless.\r\n5. In
Console, set the `cluster.logsdb.enabled` setting: \r\n```\r\nPUT
/_cluster/settings\r\n{\r\n \"persistent\" : {\r\n
\"cluster.logsdb.enabled\" : true\r\n }\r\n}\r\n```\r\n6. Go to the data
stream/templates list and verify that the index mode\r\nof the test data
stream/template that we created is displayed as LogsDB\r\n7. Change the
cluster setting to `false` and verify that the index mode\r\nis now
displayed as Standard.\r\n\r\n---------\r\n\r\nCo-authored-by:
kibanamachine
<42973632+kibanamachine@users.noreply.github.com>","sha":"b08eaa7d5a170436d75ae909972bdd6770dea3b3"}},{"branch":"8.x","label":"v8.18.0","branchLabelMappingKey":"^v8.18.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: Elena Stoeva <59341489+ElenaStoeva@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:prev-minor Backport to (8.x) the previous minor version (i.e. one version back from main) Feature:Index Management Index and index templates UI release_note:skip Skip the PR/issue when compiling release notes Team:Kibana Management Dev Tools, Index Management, Upgrade Assistant, ILM, Ingest Node Pipelines, and more v8.18.0 v9.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

With cluster.logsdb.enabled: true, Kibana shows "Index mode: Standard", when LogsDB will be used
5 participants