-
Notifications
You must be signed in to change notification settings - Fork 25.3k
Enable failure store for log data streams #131261
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
Open
eyalkoren
wants to merge
11
commits into
elastic:main
Choose a base branch
from
eyalkoren:logs-enable-faliure-store
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+168
−10
Open
Changes from 5 commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
2872d81
Enabling failure store for log data streams
eyalkoren 915a9c0
Merge remote-tracking branch 'upstream/main' into logs-enable-faliure…
eyalkoren 7c53ce7
Update docs/changelog/131261.yaml
eyalkoren 011f862
Adjusting tests
eyalkoren f8c34c1
Merge remote-tracking branch 'eyalkoren/logs-enable-faliure-store' in…
eyalkoren de13ae7
Merge remote-tracking branch 'upstream/main' into logs-enable-faliure…
eyalkoren cac9c82
Update docs/changelog/131261.yaml
eyalkoren 2304df6
Merge remote-tracking branch 'eyalkoren/logs-enable-faliure-store' in…
eyalkoren 71a4898
Bump StackTemplateRegistry#REGISTRY_VERSION
eyalkoren af5a001
Replace explicit indices with API conventions in yaml tests
eyalkoren a686b70
Merge remote-tracking branch 'upstream/main' into logs-enable-faliure…
eyalkoren File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
pr: 131261 | ||
summary: Enable failure store for log data streams | ||
area: Data streams | ||
type: feature | ||
issues: | ||
- 131105 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
81 changes: 81 additions & 0 deletions
81
...eams/src/yamlRestTest/resources/rest-api-spec/test/data_stream/260_logs_failure_store.yml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
--- | ||
setup: | ||
- requires: | ||
cluster_features: [ "gte_v9.1.99" ] | ||
reason: "failure store became enabled by default for log data streams in 9.2.0" | ||
|
||
- do: | ||
indices.create_data_stream: | ||
name: logs-app-default | ||
--- | ||
teardown: | ||
- do: | ||
indices.delete_data_stream: | ||
name: logs-app-default | ||
ignore: 404 | ||
|
||
--- | ||
"Test logs-*-* data streams have failure store enabled by default": | ||
# index a valid document (string message) | ||
- do: | ||
index: | ||
index: logs-app-default | ||
refresh: true | ||
body: | ||
'@timestamp': '2023-01-01T12:00:00Z' | ||
host: | ||
name: 'server-01' | ||
severity: 'INFO' | ||
message: "Application started successfully" | ||
- match: { result: created } | ||
|
||
- do: | ||
indices.get_data_stream: | ||
name: logs-app-default | ||
- match: { data_streams.0.name: logs-app-default } | ||
- length: { data_streams.0.indices: 1 } | ||
- set: { data_streams.0.indices.0.index_name: idx0name } | ||
- match: { data_streams.0.failure_store.enabled: true } | ||
- length: { data_streams.0.failure_store.indices: 0 } | ||
|
||
# index a document with (object message, causing a mapping conflict) | ||
- do: | ||
index: | ||
index: logs-app-default | ||
refresh: true | ||
body: | ||
'@timestamp': '2023-01-01T12:01:00Z' | ||
host: | ||
name: 'server-02' | ||
severity: 'ERROR' | ||
message: | ||
struct: | ||
value: 42 | ||
- match: { result: 'created' } | ||
- match: { failure_store: used} | ||
|
||
- do: | ||
indices.get_data_stream: | ||
name: logs-app-default | ||
- length: { data_streams.0.failure_store.indices: 1 } | ||
- set: { data_streams.0.failure_store.indices.0.index_name: fs0name } | ||
|
||
- do: | ||
search: | ||
index: $idx0name | ||
eyalkoren marked this conversation as resolved.
Show resolved
Hide resolved
|
||
body: | ||
query: | ||
match_all: {} | ||
- length: { hits.hits: 1 } | ||
- match: { hits.hits.0._source.severity: "INFO" } | ||
- match: { hits.hits.0._source.message: "Application started successfully" } | ||
|
||
- do: | ||
search: | ||
index: $fs0name | ||
eyalkoren marked this conversation as resolved.
Show resolved
Hide resolved
|
||
body: | ||
query: | ||
match_all: {} | ||
- length: { hits.hits: 1 } | ||
- match: { hits.hits.0._source.document.source.message.struct.value: 42 } | ||
- match: { hits.hits.0._source.error.type: "document_parsing_exception" } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.