-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[Stack Monitoring] Add log-* index pattern support on SM UI #139121
[Stack Monitoring] Add log-* index pattern support on SM UI #139121
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had a couple code-level thoughts but mostly looks pretty good.
The test steps were pretty involved, but I was able to get some logs to show up.
If anyone else tries, be careful about which kibana. At first I thought it didn't work but I was on the elastic-package kibana (5601) not the PR kibana (5602).
// 'data_stream.type' will always be 'logs' for `logs-*` indices. | ||
should: [ | ||
{ term: { 'service.type': 'elasticsearch' } }, | ||
{ term: { 'data_stream.type': 'logs' } }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The logic here has me a little concerned that this might break for standalone filebeat.
Should we maybe have a test that loads in es-archives for both filebeat-* and logs-* to ensure either can work (or even both to account for a transitional case?).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed, we've initially discussed that but ended up making sure service.type
exists in datastreams as well. see elastic/integrations#4033 (comment)
const indexPatterns = getNewIndexPatterns({ | ||
type, | ||
config: getConfigWithCcs(true), | ||
moduleType: 'elasticsearch', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I kind of wanted to put moduleType
in the TestTuple, but I can see the ecsLegacyOnly: true
. That got me wondering what ecsLegacyOnly: true/false
is even really for, but that's beyond the scope of this PR I think.
@elasticmachine merge upstream |
Pinging @elastic/infra-monitoring-ui (Team:Infra Monitoring UI) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall I'd say this is looking pretty good, only thing I'd change before merge is that inaccurate comment.
config: getConfigWithCcs(false), | ||
moduleType: 'elasticsearch', | ||
}); | ||
expect(indexPatterns).toBe(expected); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The repetition in these test cases still makes me twitch a little, but maybe best left for future enhancement.
💚 Build Succeeded
Metrics [docs]
History
To update your PR or re-run it, just comment with: |
…139121) * Add log-* index pattern support on SM UI * logs query fix * remove datastream dedicated filter * [CI] Auto-commit changed files from 'node scripts/eslint --no-cache --fix' * remove comment * renaming filebeat leftovers to logs * extract elasticsearch logs filter * [CI] Auto-commit changed files from 'node scripts/precommit_hook.js --ref HEAD~1..HEAD --fix' * update filter * typo Co-authored-by: klacabane <[email protected]> Co-authored-by: Kibana Machine <[email protected]>
Summary
This PR adds
logs-*
index pattern support on places in the SM UI where it queriesfilebeat-*
modules, in order to also work with integration packagescloses #120416
Screenshots
Cluster Overview UI
![image](https://user-images.githubusercontent.com/2767137/185454971-6dd2adff-b2c5-4ece-b648-a17bbc5a2f3c.png)
Elasticsearch overview
![image](https://user-images.githubusercontent.com/2767137/185455050-784ae36f-bea3-4afe-8328-169a04153a05.png)
Indices view
![image](https://user-images.githubusercontent.com/2767137/185455157-924f4a01-75c1-4185-a2db-dc7f35b06c06.png)
Testing
Make sure you have elastic-package installed.