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

[Stack Monitoring] Removing remaining usage of legacy getIndexPatterns() #123508

Closed
3 tasks done
Tracked by #120415
neptunian opened this issue Jan 20, 2022 · 4 comments · Fixed by #140257
Closed
3 tasks done
Tracked by #120415

[Stack Monitoring] Removing remaining usage of legacy getIndexPatterns() #123508

neptunian opened this issue Jan 20, 2022 · 4 comments · Fixed by #140257
Assignees
Labels
Feature:Stack Monitoring Team:Infra Monitoring UI - DEPRECATED DEPRECATED - Label for the Infra Monitoring UI team. Use Team:obs-ux-infra_services

Comments

@neptunian
Copy link
Contributor

neptunian commented Jan 20, 2022

This is a follow up from #119112. getIndexPatterns was replaced with getNewIndexPatterns. Though there are still a few places that use it:

  • places using filebeat-* index pattern - done in [Stack Monitoring] Add log-* index pattern support on SM UI #139121
    • we have a couple of views where we show logs and we query the filebeat-* . getNewIndexPatterns needs to be updated to support logs-* along with corresponding data stream dataset and replace getIndexPatterns wherever we use filebeat. Make sure to check for any other areas that might be using filebeat index without using getIndexPatterns
  • node_setup_status.ts
    • this route handler is using the old getIndexPattern because it passes the index pattern into getCollectionStatus. At the time, I wasn't familiar with getCollectionStatus (it's a large function) and wanted to make sure I understood it more before changing the index pattern it used. getCollectionStatus handles getting the collection method(s) the user is running. We don't need to update ito handle the Agent(metrics-*) case here, but just ensure it doesn't break existing functionality
  • cluster_setup_status.ts
    • same as above

After these updates are made, make sure there are no other instances and rename getNewIndexPatterns to getIndexPatterns and remove the old code

@neptunian neptunian added the Team:Infra Monitoring UI - DEPRECATED DEPRECATED - Label for the Infra Monitoring UI team. Use Team:obs-ux-infra_services label Jan 20, 2022
@elasticmachine
Copy link
Contributor

Pinging @elastic/infra-monitoring-ui (Team:Infra Monitoring UI)

@crespocarlos
Copy link
Contributor

After looking at node_setup_status.ts, If I consider that this endpoint is only called by Kibana, it seems that this endpoint is not being used anymore.

This endpoint is only called here. But calls to updateSetupModeData never the pass the uuid argument (see 1 and 2), so only cluster endpoints seem to be still used. I don't know if I'm missing something here

@klacabane
Copy link
Contributor

Looks like dead code, metricbeat does not consume the api and it's unlikely any other stack component does. Should we keep it for the moment and investigate removing it in a separate issue ?

@crespocarlos
Copy link
Contributor

Sounds like a good plan. I'll open a ticket for that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:Stack Monitoring Team:Infra Monitoring UI - DEPRECATED DEPRECATED - Label for the Infra Monitoring UI team. Use Team:obs-ux-infra_services
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants