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

Cherry-pick #18865 to 7.x: index_pattern under visState.params cannot be empty "" #18947

Merged
merged 1 commit into from
Jun 4, 2020
Merged

Cherry-pick #18865 to 7.x: index_pattern under visState.params cannot be empty "" #18947

merged 1 commit into from
Jun 4, 2020

Conversation

kaiyan-sheng
Copy link
Contributor

@kaiyan-sheng kaiyan-sheng commented Jun 3, 2020

Cherry-pick of PR #18865 to 7.x branch. Original message:

This PR is to add check to make sure index_pattern under visState.params not be empty "". For example in metricbeat dashboard/visualization, when default index is not metricbeat-* in Kibana and index_pattern is set to "", visualizations will take the default index pattern by default. If the default index pattern is not metricbeat-*, then these dashboards will fail and show no data.

This PR is to not only fix the rest of the dashboards having this issue but also adding the check in mage/check.go.

Related PR: #18698
Discuss Forum Link: https://discuss.elastic.co/t/metricbeats-dashboards-for-kubernetes-controller-manager/233402/4

This PR also improved the error message on which visualization failed the test:

>> Dashboard format - module/kubernetes/_meta/kibana/7/dashboard/Metricbeat-kubernetes-controller-manager.json:
   expected index pattern reference 'metricbeat-*': unexpected index pattern reference found in visualization state params: `` in visualization `Controller Process [Metricbeat Kubernetes]`
>> Dashboard format - module/kubernetes/_meta/kibana/7/dashboard/Metricbeat-kubernetes-proxy.json:
   expected index pattern reference 'metricbeat-*': unexpected index pattern reference found in visualization state params: `` in visualization `Proxy CPU [Metricbeat Kubernetes]`
   expected index pattern reference 'metricbeat-*': unexpected index pattern reference found in visualization state params: `` in visualization `Proxy memory [Metricbeat Kubernetes]`

* `index_pattern` under visState.params cannot be empty ""

(cherry picked from commit f6710e3)
@kaiyan-sheng kaiyan-sheng requested a review from a team as a code owner June 3, 2020 16:32
@kaiyan-sheng kaiyan-sheng self-assigned this Jun 3, 2020
@kaiyan-sheng kaiyan-sheng added the Team:Platforms Label for the Integrations - Platforms team label Jun 3, 2020
@elasticmachine
Copy link
Collaborator

Pinging @elastic/integrations-platforms (Team:Platforms)

@elasticmachine
Copy link
Collaborator

elasticmachine commented Jun 3, 2020

💚 Build Succeeded

Pipeline View Test View Changes Artifacts preview

Expand to view the summary

Build stats

  • Build Cause: [Started by user kaiyan-sheng, Replayed #1]

  • Start Time: 2020-06-04T17:34:39.206+0000

  • Duration: 80 min 1 sec

Test stats 🧪

Test Results
Failed 0
Passed 6665
Skipped 1069
Total 7734

@kaiyan-sheng kaiyan-sheng merged commit c194dbd into elastic:7.x Jun 4, 2020
@kaiyan-sheng kaiyan-sheng deleted the backport_18865_7.x branch June 4, 2020 19:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport review Team:Platforms Label for the Integrations - Platforms team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants